Python Basics
Values, Variables & Inputs
If Statements
WA Grant Code
100
What function does this line of code use:

print('This is the best activity ever')

The print function
100

What are the four types of values?


1. Integers

2. Floats

3. Strings

4. Booleans

100

What statements allow decision-making based on certain conditions?

If statements!

If variable operator value:

      variable = value

else:

      variable = value


100

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

200

How do you write a comment in Python?

A hashtag #

200

Variables are like _______ that hold assigned information.

Containers

200

What are the three operators that we mentioned in this activity?

= equal to 

> greater than 

< less than

200

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

300

What would the result of this code be:

print('This is the best activity ever!')

This is the best activity ever!

300

Let's say you have a tuition amount of $12,500.00. 

What value type would the 12,500.00 be?

Float (it is a decimal)
300

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

300

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


400

What is the name for "a sequence of characters such as letters, digits, symbols, or emojis" that is found in triple quotes?

"""A string!"""

400

What character must be used for long variable names?

an underscore!

example: units_sold

400

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.

  • If the age is 18 or older, it prints: "You are an adult."
  • Otherwise, it prints: "You are not an adult yet."
400

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.

M
e
n
u