Fall 2024 - P5
Big Idea 3 | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .10 |
Python Variables Popcorn Hacks
3.1 Python popcorn hacks
Popcorn Hack #1: Try making your own set of 3 variables.
Example:
a = 20
favorite_subject = "CSP"
favorite_sport = "Basketball"
Popcorn Hack #2: Now make two boolean variables.
Example:
bool_1 = True
bool_2 = False
print(bool_1)
print(bool_2)
Popcorn Hack #3: Create a Dictionary in python
Example:
dictionary = {
'name': 'Bob',
'age': 30,
'sports': ['basketball', 'football']
}
print(dictionary)