From text to numbers, and
other data types in Python.
Completed
What is information?
Communication & History: Ancient Civilizations
Today
History of Numbers
Data Types & Numbers
Mathematical Operators
Upcoming
Logical Operators
Number Bases
1s & 0s, all the way down
I've already asked you if you've really thought about information, as an actual concept before. You probably hadn't... and that's not unusual.
We live in the "Information Age", and yet many scientists are considering that we may have overlooked the important of information as an actual concept as well. We've discovered information, collected information, shared information... but rarely have we discussed the concept of information itself.
How important is information as a concept?
We're still trying to figure that out.
So we looked at letters... how we are to use abstract symbols and sounds, that when combined in the right patterns, represent something.
What about numbers? Have you thought about numbers? Is how we use symbols for numbers similar to how pictograms were used? Are they an artifact of pictograms? Maybe.
Create a document in your Google Shared Folder for this class. Let's call it Python & Numbers. We'll use this document for the week.
Part 1:
In your document, briefly explain string, vs int, vs float, vs bool; and provide examples of each.
Part 2
Using paper and pencil, try out the following:
1.
val1 = 30.0
val2 = 15.0
result = val1 / val2
print (val1)
2.
val1 = 15
val2 = 30.0
result = val2 / val1
print (result)
3.
val1 = 5
val2 = 3
val3 = val1 + val2
val1 = val3
result = val1 - val3
print (result)
4.
val1 = "4"
val2 = "2"
val3 = val1 + val2
val1 = val3
result = val1 + val3
print (result)
Part 3
Try the previous, but using Python.
Part 4
Compare your results, and look over the examples again.
Were there any that you got wrong?
What tricked you up?
Which sequence did you feel was the trickiest?
Explain your opinion?