Difference between revisions of "User:Praveer-mathur-9f3d@uni-bonn.de"
Jump to navigation
Jump to search
(Blanked the page) Tag: Blanking |
|||
| Line 1: | Line 1: | ||
| + | === Quiz === <!--T:5--> | ||
| + | What values do the two variables "mass" and "age" have in the following lines? | ||
| + | |||
| + | {{hidden begin | ||
| + | |title = mass = 47.5 | ||
| + | print(mass) | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="()"} | ||
| + | + Click and submit to see the answer | ||
| + | || <code>47.5</code> | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
| + | |||
| + | {{hidden begin | ||
| + | |title = age = 122 | ||
| + | print(mass, age) | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="()"} | ||
| + | + Click and submit to see the answer | ||
| + | || <code>47.5 122</code> | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
| + | |||
| + | {{hidden begin | ||
| + | |title = mass = mass * 2.0 | ||
| + | print(mass, age) | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="()"} | ||
| + | + Click and submit to see the answer | ||
| + | || <code>95.0 122</code> | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
| + | |||
| + | {{hidden begin | ||
| + | |title = age = age - 20 | ||
| + | print(mass, age) | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="()"} | ||
| + | + Click and submit to see the answer | ||
| + | || <code>95.0 102</code> | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
Revision as of 13:50, 6 March 2026
Quiz
What values do the two variables "mass" and "age" have in the following lines?
mass = 47.5
print(mass)
age = 122
print(mass, age)
mass = mass * 2.0
print(mass, age)
age = age - 20
print(mass, age)