5
5.5 + 5
print 'hello'
[1,2,3]
['I', 'am', 'awesome']
scoreboard = 0
goal = 3
scoreboard = scoreboard + goal
print scoreboard
age = 18
if age > 20:
print 'welcome'
else:
print 'get out'
age = 18
if age > 20:
print 'welcome'
else:
print 'get out'
age = 18
if age > 20:
print 'welcome'
else:
print 'get out'
if age > 40:
print 'hello, mam'
age = 21
if age > 20:
print 'welcome'
else:
print 'get out'
if age > 40:
print 'hello, mam'
awesome_list = ['a', 'b', 'c']
for letter in awesome_list:
print letter
lsdkjfsdlfkj
alphabet = ['blah']
kjdkjvhkjhdsk
'I'm awesome'
{}
if age > 18:
print age
age = {glen: 23, craig: 27}
age = {'glen': 23, craig: 27}
age = {'glen': 23, 'craig': 27}
age['glen']
age['doug']
age = {'glen': 23, 'craig': 27}
print age['glen']
if age > 18:
print age
for letter in awesome_list:
print letter
age = {
'glen': 23,
'craig': 27
}
age
numbers = [1,2,3]
print numbers[0]
print numbers[3]
cookies = 2300
age = 23
cookies_per_year = cookies / age
print cookies_per_year
age = 0
print age
cookies_per_year = cookies / age
if age > 0:
cookies_per_year = cookies / age
else:
print 'must enter an age over 0, baby'l
if age is not 0:
print 'yay'
def give_me_number():
return 5
print give_me_number()
print give_me_number()
a_number = give_me_number()
print a_number
print give_me_number() + 5
def five():
some_number = 5
print some_number
def five():
some_number = 5
print some_number
def hi_glen():
return 'hi glen'
print hi_glen()
def hi(name):
return 'hi, ' + name
print 'hi, ' + 'glen'
print hi('glen')
web_input_name = 'glen'
print hi(web_input_name)
print hi('adam')
print hi(5)
print hi([1,2,3])
def greet(language, name):
if language is 'english':
return 'hi, ' + name
if language is 'spanish':
return 'hola, ' + name
else:
return 'hello, ' + name
user_name = 'glen'
user_language = 'english'
print greet(user_language, user_name)
print greet('spanish', 'marta')
def nothing():
number = 5
print nothing()
None
def plus1(num):
num = num + 1
number = 5
plus1(number)
print number
def plus1(num):
num = num + 1
new_number = 5
plus1(new_number)
print new_number
def plus1(num):
num = num + 1
number = 5
plus1(number)
print num
def plus1(num):
num = num + 1
return num
number = 5
print plus1(number)
print plus1()