Conditional statements; for AND while loops; screen input and output; debugging; Python arithmetic; four data types

-for i in range(#,#):

-print(i)

-This shows that a number will be printed. Whatever number is being printed, the server will count up and stop before the number ends. For example:

-for i in range(6):

print(i)

Output: 0, 1, 2, 3, 4, 5

-if it has two numbers, it will print the first number and all numbers in between.

-for i in range(1,7):

print(i)
Output: 1, 2, 3, 4, 5, 6

-if there are 3 numbers, it will count by whatever the third number is.

-for i in range(10,41,5)

print(i)

Output: 10, 15, 20, 25, 30, 35, 40

-str: a string, or text

-int: an integer(whole) number

-float: a decimal number

-bool: True or False

X = True

print(X)

-Python Variables: 

-May only include letters, numbers, and underscores; no other symbols

-cannot begin with numbers

-cannot include reserved words(while, in, else, etc.)

-names are case-sensitive.

-Convention: lowercase letters/underscores

-int(input(“____________”)

-if something is true

print(________)

elif something is true

print(________)

Else something is true

print(________)

-Math

-** is exponents

-* is multiplication

-/division

-%gives remainder for division

-//rounds down

- -subtracts

-+adds


robot