Some more notes - BenWare-FED/Python GitHub Wiki

Syntax: Variable = expression

area_circle= pi * radius * radius

Python first computes the value on the right hand side. The value is then assigned to the variable on the left hand side.

pi * radius * radius = area_circle WILL NOT WORK

you can put variables inside print statements with {} ex print(f"The input temperature {temperature_check} is below freezing point.")

variable = input("yadayadayadayadayada").upper makes everything uppercase

Converting data types

"new variable" = float("variable being converted")

"new variable" = int("variable being converted")

"new variable" = str("variable being converted")

faster way for inputs is "variable" = int/float(input("message"))

How to seperate numbers

ones = num % 10

num = num // 10

tens = num % 10

num = num // 10

repeat as needed

How to limit decimal places

print(f"I am limiting decimals in {round(variable,2)} rounds to two decimal places print("I am limiting decimals in", round(variable, 19))

Just some list notes

list = [10,15,18,19,20]

j=1

print(list[j]) will print the item in the list that is in index space 1 which is 15

print(list[j + 1]) will print the item in the list that is in the index space 2 because j is one and one is being added to it. print is 18