Answer:
When i=9 it is 90, when i=151 it is 25.
Explanation:
The program asks the user to enter the value of the i. Then, i is checked. If i is greater than 10 or smaller than or equal to 99, the value of the equation, (i-i/10*10)*10+i/10), is printed. Otherwise, "out of range" is printed.
For i=9, since the value is smaller than or equal to 99, the if part will be executed. If you substitute 9 for the i in the equation, the output will be 90.
→ (9-9/10*10)*10+9/10) (Since both numbers are integers in 9/10, it is 0, not 0.9)
→ (9-0*10)*10+0)
→ (9)*10
→ 90
For i=151, since the value is greater than 10, again the if part will be executed. If you substitute 151 for the i in the equation, the output will be 25.
→ (151-151/10*10)*10+151/10) (Since both numbers are integers in 151/10, it is 15, not 15.1)
→ (151-15*10)*10+15)
→ (151-150)*10+15)
→ 1*10+15
→ 25
Answer:
process
Explanation:
Given
The program in python
Required
What does line 2 represents
The line 2 of the program is: weight = float(strWeight)
And what it does is that it converts the input weight from string to float after the user supplies value for strWeight
This conversion not input, output, neither is it planning. It is process because according to the program it prepares variable weight to be printed as float on line 3
Answer:
move 3 right down 1 3 to the left. down 2 2 to the right up one. 1 to the left one up 2 to the right and 2 down and your at the end without going back hope this helps
Explanation: