From text to numbers, and
other data types in Python.
Completed
What is information?
Data Types & Numbers
Today
History of Numbers
Comparison Operators
Upcoming
Number Bases
1s & 0s, all the way down
Start with typing:
https://shaunwegs.github.io/2024/cs/t/index.html
Keep your screenshot, you'll need it later.
There are a variety of potential 'first' computers. It partially depends on what you mean by computer. If you mean a machine that can computer numbers, a contender would be the mechanical machines of Charles Babbage.
Yesterday I asked you to think about numbers... and if you've ever really though about the concept of numbers...
So today... have you thought about how you think about numbers?
In your document for this week, add a section for comparison operators.
TASK, part 1
Similar to yesterday, using paper and pencil, can you figure out what will print?
1.
val1 = 30.0
val2 = 15.0
val1 = val1 - val2
print (val1 == val 2)
2.
val1 = 15
val2 = 30.0
val2 = val2 / val1
print (val2 > 1)
3.
val1 = 5
val2 = 3
val3 = val1 + val2
val1 = val3
result = val1 - val3
print (result is val2)
4.
val1 = 4
val2 = 2
val3 = val1 / val2
val1 = val3
result = val1 + val3
print (result > val2)
Part 2
Try the previous, but using Python.
Part 4
Compare your results, and look over the examples again.
Were there any that you got wrong?
Were that any that you felt were tricky?