print('This is the best activity ever')
What are the four types of values?
1. Integers
2. Floats
3. Strings
4. Booleans
What statements allow decision-making based on certain conditions?
If statements!
If variable operator value:
variable = value
else:
variable = value
What is the resulting WA Grant amount if:
- income = 650000
- family size = 4
(you will need to use your code for this!)
The resulting WA Grant Amount is $12,378.00
How do you write a comment in Python?
A hashtag #
Variables are like _______ that hold assigned information.
Containers
What are the three operators that we mentioned in this activity?
= equal to
> greater than
< less than
If your family size is 5, what income range do you have to be in to receive a WA Grant Amount of $6189.00?
Between $91,000 and $98,000
What would the result of this code be:
print('This is the best activity ever!')
This is the best activity ever!
Let's say you have a tuition amount of $12,500.00.
What value type would the 12,500.00 be?
You can extend an if statement with what?
An "elif"
If variable operator value:
variable = value
elif variable operator value:
variable = value
else:
variable = value
In this code:
income = float(input('Enter your income (only enter numbers, no dollar sign):'))
Why can you only enter numbers and no dollar sign? What happens if you enter a dollar sign?
Input code reads the user's input as a FLOAT and not a string, so it only registers numbers and decimals but no other characters!
If you enter a dollar sign, the code will crash
What is the name for "a sequence of characters such as letters, digits, symbols, or emojis" that is found in triple quotes?
"""A string!"""
What character must be used for long variable names?
an underscore!
example: units_sold
What is this if statement saying:
age = int(input("Please enter your age: "))
if age >= 18:
print("You are an adult.")
else:
print("You are not an adult yet.")
This program checks if a person is an adult:
It asks the user for their age using input.
Your total cost of attending UW as an in-state student is $34,552 (before financial aid)
Let's say you have received $15,000 in scholarships, $5,000 in grants and have saved up $5,000 in your college savings.
If your income is 65000 and your family size is 3, what is the WA grant amount? Will it cover the remaining cost?
WA Grant amount is $12,378, and it will cover the remaining cost.
$34,552 (COA) - $25,000 (scholarships, grants, and college savings) = $9,552.
Since the WA Grant amount is greater than $9,552, it would cover the remaining cost.