#1/bin/python3
#print string
print('strings and things')
print('Hello, world!')
print('this is "+" a string')
print('\n')
#MATH
print("Math time:")
print(3+3)#add
print(3-3)#subtract
print(3*3)#mul
print(3/3)#div
print(3 * 3 - 3 / 3)
print(3 ** 3)
print(3 % 1)
print(30 // 3)
print('\n')
#VAR & METHOD
print("FUN WITH VAR AND METHODS")
quote  = "All is fair in love and war"
print(len(quote))#length
print(quote.upper())#uppercase
print(quote.lower())#lowercase
print(quote.title())#title

name  = "kevin"
age = 19 #int int(19)
gpa = 4.2 #floar float(4.2)
print(int(age))
print(int(29.9)) #does not round

print("MY name is " + name + " and  I am " + str(age) + " years old")
print('\n')

age += 1
print(age)
birthday = 1
age += birthday
print(age)
print('\n')

#Functions

print("now,some FUNCTIONS")
def who_am_i():
    name = "kevin"
    age = 19 #int int(19)
gpa = 4.2 #floar float(4.2)
print(int(age))
print(int(29.9)) #does not round

print("MY name is " + name + " and  I am " + str(age) + " years old")
who_am_i()

#Adding parameter
def add_one_hundred(num):
    print(num+100)
add_one_hundred(100)
 # add in  multiple parameters
def add(x,y):
    print(x + y)
add(7,2)
add(43,43)

#using return
def mul(x,y):
    return x * y
print(mul(3,2))

def sqrt(x):
    return x ** 5
print(sqrt(64))    

print('\n')

#Boolean expression(T or F)
print("Boolean Expressions")
bool1 = True
bool2 = 3*3 == 9 
bool3 = False
bool4 = 3 * 3 == 9
print(bool1,bool2,bool3,bool4)
print(type(bool1))
bool5 = "True"
print(type(bool5))


#relational and boolean experssions
greater_than = 8 > 2
less_than = 2 < 8
greater_than_equal_to = 8 >= 2
less_than_equal_to  = 2 <= 8
print(greater_than,less_than,greater_than_equal_to,less_than_equal_to)

test_and = (7 > 5) and (5 < 7)
test_or = (7 > 5) or (5 < 7)
test_not = not True
print(test_and,test_or,test_not)
print('\n')
#conditional Statements
print("conditional Statements:")
def soda(money):
    if money >= 2:
        return "you got soda!!"
    else:
        return "no soda for u!"
print(soda(3))
print(soda(1))

def alcohol(age,money):
    if(age >= 18) and (money >= 20):
        return "you got everything in this shop"
    elif(age >= 18) and (money < 20):
        return "come back with more money"
    elif(age < 18) and (money >= 20):
        return "NICE TRY KIDDO"
    else:
        return "keep the phuck off kiddo"
print(alcohol(18,20))
print(alcohol(13,20))
print(alcohol(18,2))
print(alcohol(1,2))

print('\n')
#list
print("LIST have bracket:")
color = ["yellow","red","blue","green"]
print(color[0:3])
print(color[2:])
print(color[:3])
print(color[-1])
color.append("BLACK")
print(color)
color.pop()
print(color)
color.pop(2)
print(color)

movies = ["saw","moonlight","martian","loonger"]
combined = zip (movies,color)
print(list(combined))

#TUPLES
print("TUPLES have parantheses and cannot modify")
numbers = (12,32,4,34,54,5,6)
print(numbers[0])
#LOOPING
print("for loops start to finish of iterate:")
vegetables = ["cucumber","spinach","cabbage"]
for x in vegetables:
    print(x)
print("while loops - Execute as long as True:")
i = 1
while i < 10:
    print(i)
    i += 1







