Second half of the course!



# Thanks, Todd Waits
# oh look, comments start with pound sign, not //
import random

# no need to declare variables.
r = random.randint(0, 100)

while r < 85: # no parentheses.
    if r > 70:
        print(r, ":  so close!", sep="")    # what's that sep=""?
    elif r > 45:                            # elif?? sure buddy
        print(r, end="")
        print(":  Getting there...")
    else: # I always forget the colons on the elses
        print("{}:  Still so far away!".format(r))

    r = random.randint(0, 100)

print("WE GOT OUT!")

# a function with no code.
def emptyFunction():
	pass # 'pass' is like empty braces {}

""" Multi-line comments are delimited by triple-quotes.
This is kind of weird, because we'll see that we can also use
triple-quotes for strings... """

Control structures

Variables and types

See the official docs here