NTdjZjc2ODk2NDg5YmZjZTE4MGJiYzQ0OThlM2I1OTI5OWM5NGNjZDBhMjE0ODU1OGQ2ZWMzMWNhNTcwZmMyZg.msfhd525.eyJ1cmwiOiIvcGwvY291cnNlX2luc3RhbmNlLzIvaW5zdGFuY2VfcXVlc3Rpb24vNDgwLyIsImF1dGhuX3VzZXJfaWQiOiIxIn0
Skip to main content Accessibility guide
PrairieLearn Go home
  • XC 101, SectionA
  • Assessments
  • Gradebook
  • HW3
Load from disk
  • Dev User student
    View type
    ✓ Staff view staff ✓ Student view student ✓ Student view without access restrictions student
    Effective user
    Customize…
    Course Requests Settings Log out

Regenerate assessment instance

Warning: Regenerating the assessment instance will select a new set of questions from this assessment. Any progress on the current assessment instance will be lost.

Are you sure you want to regenerate the assessment instance?

Course staff: Regenerate your assessment instance to pick up changes to the assessment or to get a fresh set of questions.

HW3.6. Construct the recipe for a new probiotic

As a food researcher at large beverage company, you have been tasked with coming up with a secret formula for the next probiotic superfood: kombucha! At any point in time during the fermentation process, the kombucha solution can have four ingredients that react with each other: sugar water, acid, carbon dioxide, and the kombucha culture itself.


You know how each ingredient of the solution changes in one hour:

  • 10% of the sugar water gets converted to acid, and another 20% is converted to the culture.
  • 25% of the acid is converted to carbon dioxide, and 5% is converted to the culture.
  • 45% of the carbon dioxide gets re-absorbed back into acid.
  • The culture does not change into another state.

Given the initial solution contains 70% of sugar water and 30% of culture, find how many hours it will take for the concentration of sugar water to decrease to 15%, and save this as hours. Save the composition of ingredients at this time as the 1d numpy array composition, assuming the following ingredient's order:

1
composition_ingredient_order = ['sugar water', 'acid', 'co2', 'culture']

Your code snippet should define the following variables:

Name Type Description
hours positive integer The number of hours needed to accomplish what is requested in the problem statement.
composition 1d array The composition of ingredients at 'hours'.
user_code.py
Editor Settings
Note: this is an example of fixed variant question. Read more here.

Correct answer

Homework 3

Assessment overview
Total points: 0/65
Score:
0%

Question HW3.6

Value: 8
Total points: — /8
Auto-graded question

This form is only for reporting errors in the question itself. Do not use this form if you just don't know how to answer the question.

Previous question Next question

 Personal Notes

No attached notes

Attached files will be saved here for your reference. These files act as personal notes and can be used for your own review purposes. They are not used for grading.

Max file size: 10 MB

Attached personal notes will be saved here for your reference. These notes can be used for your own review purposes. They are not used for grading.

Staff information

Student details

Dev User
dev@example.com

Question

QID:
demo/annotated/engMarkovBrewing
Title:
Construct the recipe for a new probiotic

Variant

Started at:
2026-08-04 16:39:25 (CDT)
Duration:
0s
Show/Hide answer
{}

Assessment instance

Assessment:
homework/manualGrading
Started at:
2026-08-04 16:39:08 (CDT)
Duration:
0s
View log
This box is not visible to students.