0 added
0 removed
Original
2026-01-01
Modified
2026-03-09
1
<p>We’ve got it all now! You are now ready to fully solve Muffin’s third task. And not just solve it, but make the program more user-friendly and intuitive. Let us remind you about the task:</p>
1
<p>We’ve got it all now! You are now ready to fully solve Muffin’s third task. And not just solve it, but make the program more user-friendly and intuitive. Let us remind you about the task:</p>
2
<p><b>Third task</b>: “Write a program for calculating the caloric value of my breakfast. I have milk for breakfast. I want to enter the amount of milk I drank and see its caloric value.”</p>
2
<p><b>Third task</b>: “Write a program for calculating the caloric value of my breakfast. I have milk for breakfast. I want to enter the amount of milk I drank and see its caloric value.”</p>
3
<p>Let’s break the solution down into several steps:</p>
3
<p>Let’s break the solution down into several steps:</p>
4
<ol><li>collect breakfast data from Muffin,</li>
4
<ol><li>collect breakfast data from Muffin,</li>
5
<li>save this data to a variable for further processing,</li>
5
<li>save this data to a variable for further processing,</li>
6
<li>show a message that the data has been received, so that Muffin is no longer worried,</li>
6
<li>show a message that the data has been received, so that Muffin is no longer worried,</li>
7
<li>process data using mathematical operations where we use our first variable,</li>
7
<li>process data using mathematical operations where we use our first variable,</li>
8
<li>save the result of our calculations to a second variable,</li>
8
<li>save the result of our calculations to a second variable,</li>
9
<li>and show a message with the result of our program’s work.</li>
9
<li>and show a message with the result of our program’s work.</li>
10
</ol><p>Let’s first deal with the first three steps and cover the other three in the next task.</p>
10
</ol><p>Let’s first deal with the first three steps and cover the other three in the next task.</p>
11
<p>Working together: we come up with variable names, texts, and formulas, you write the code.</p>
11
<p>Working together: we come up with variable names, texts, and formulas, you write the code.</p>