Process-Oriented Guided Inquiry Learning
Activity 2: Arithmetic Expressions
Roles:
Write an algorithm (on paper, in English not Python code) that
Now, write the Python code.
When finished or stuck, share with your neighbor(s).
total_days = int(input("days: "))weeks = total_days // 7, days = total_days % 7print(weeks, "weeks and", days, "days")How do you draw a filled shape?
Looking up documentation.
Write an algorithm (on paper, in English not Python code) that
Now, write the Python code.
When finished or stuck, share with your neighbor(s).
Escape sequences are used to represent special characters in strings.
\' - single quote\" - double quote\\ - backslash\n - newline\t - tab\u2603 - Unicode snowman\U0001F600 - Unicode grinning faceWrite a single print call that gives the following output:
Don't say "I can't"
until you've tried 😀
a. What is the output of the following code?
b. What is the output of the following code?
Check your thinking on PythonTutor.
int - integer (whole numbers)
float - floating point numbers
str - strings (sequence of characters)
https://integer.exposed/#0xffints grow instead of overflowing2 ** 53 + 1.0 + 1.0 + 1.0float has 53 bits of precisionhttps://float.exposed/0x6800What do these two videos have in common?
References:
Can you fathom the mysteries of God?
Can you probe the limits of the Almighty?
They are higher than the heavens above—what can you do?
They are deeper than the depths below—what can you know?
Their measure is longer than the earth
and wider than the sea.
Job 11:7-9 (NIV)
Discuss with neighbors:
What do we lose when we reduce the world to ints, floats, and strings?