# data[].attributes.body
def checksum(num1,num2):
    "return sum of two integer. however, if the sum between 15 and 20 it will return 20"
    total  = num1 + num2
    if total>=15 and total<=20:
        return 20
    else:
        return total
    
print(checksum(9,9))
print(checksum(20,-2))
print(checksum(-2,50))

# data[].attributes.body
def bigger(a, b, c):
if a > b and a > c:
return a
elif b > c:
return b
else:
return c

# data[].attributes.body
def F2C(fah):
"function: print fahrenheit value to celcius"
return ((fah-32)*5)/9

F2C(20)

def biggest(a,b,c):
"function: take inputs and return largest one"
return (max(a,b,c))

biggest(1,2,3)

# data[].attributes.body
def F2C(F):
"This Farenheit to Celsius "
return ((F-32))* 5/9

a=5
b=10
c=30

def bigger(a, b, c):
if a > b and a > c:
return a
elif b > c :
return b
else:
return c

bigger(10, 30, 20)

# data[].attributes.body
def F2C(Farenheit):
"This function convert  Farenheit to Celsius"
celcius =  (Farenheit - 32) *5 /9
return celcius

F2C(100)

def biggest(a,b,c):
'Compare biggest '
if a > b:
if a > c:
return a
else:
return c

elif b > a:
if b > c:
return b
else:
return c

biggest(428,20,98)

# data[].attributes.body
def F2C(fahrenheit):
"This is a function that will return fahrenheit to celsius"
return ((fahrenheit - 32) * 5) / 9

Excercise 4
def biggest(a,b,c):
"This function takes in three parameters and will return the highest number"
if(a >= b) and (a >= c):
return a
elif(b >=c) and (b>=a):
return b
else:
return c
print(biggest(5,3,2)) #5
print(biggest(5,8,2)) #8
print(biggest(5, 8, 22)) #22

# data[].attributes.body
d d
G G
Go o
o o
g g

Emerson_QuickExcericise 2.1
Good morning
Good morning
Good mornin
Good morning
Good morning

Emerson_QuickExcercise 2.2
author_index = data_vs_info.find('science')
print(data_vs_info[author_index:])

quote_end = data_vs_info.find('.')
print(data_vs_info[0:quote_end])

Task 1
#first part of the quote
quote_first_end = pythagoras.find(',')
print(pythagoras[0:quote_first_end])

#second part of the quote
quote_second_start = pythagoras.find('there')
quote_second_end = pythagoras.find('.')
print(pythagoras[quote_second_start:quote_second_end])

#author of the quote
author_index=pythagoras.find('Pythagoras')
print(pythagoras[author_index:])

String split and join
['This is a fox', 'it is hungry', 'it is running home']
This is a fox
it is hungry
it is running home
This is a fox, it is hungry, it is running home

# data[].attributes.body
def biggest(a, b, c):
if a > b:
return a
elif b > c:
return b
else:
return c

biggest(428, 20, -98)

# data[].attributes.body
d,d
G,G
Go, o
o o

exercise 2
Good morning
Good morning
Good mornin
Good morning

# data[].attributes.body
d d
G G
Go o
o o
g g

Suying_QuickEx2(ii)
Good morning
Good morning
Good mornin
Good morning
Good morning

Suying_Task1
print(data_vs_info[data_vs_info.index("D"):data_vs_info.index("science")-3])
print(data_vs_info[data_vs_info.index("science"):])
print(data_vs_info[:data_vs_info.index("D")-2])

pythagoras = "There is geometry in the humming of the \
strings, there is music in the spacing of the spheres. \
-Pythagoras"
print(pythagoras[:pythagoras.index(",")])
print(pythagoras[pythagoras.index(",")+2:pythagoras.index("-")])
print(pythagoras[pythagoras.index("P"):])

SPLIT
'This is a fox', 'it is hungry', 'it is running home.'
This is a fox
it is hungry
it is running home
This is a fox, it is hungry, it is running home.

# data[].attributes.body
T
h i i
i t t
'This is a foxu it is hungryu it is running home.'

# data[].attributes.body
def biggest(a,b,c):
if a > b and a > c:
return a
elif b > c and b > a:
return b
else:
return c

"This is a fox","it is hungry","it is running home"
""
h
i

this,is,a,fox,it,is,hungry,it,is,running,home

#Just the first part of the quote
s=pythagoras.find(",")
print(pythagoras[:s])

#Just the first part of the quote
e=pythagoras.find(",")
s=pythagoras.find(".")
print(pythagoras[e+1:s])

#Just the author
e=pythagoras.find("-")
print(pythagoras[e+1:])

#slice profession
#Slice the profession
e=len(data_vs_info)
s=data_vs_info.find("sc")
print(data_vs_info[s:e])

#slice quote
s=data_vs_info.find(".")
data_vs_info.find(".")
print(data_vs_info[:s])

# data[].attributes.body
d d
G G
Go o
o o
g g

Exercise2
Good morning
Good morning
Good mornin
Good morning
Good morning

Profession
data_vs_info[107:129]

Quote
quote_index = data_vs_info.find("You can have data without information, but you cannot have information without data")
coma_index = data_vs_info.find(".",quote_index+1)
data_vs_info[quote_index:coma_index]

1st quote
t1 = pythagoras.find(",")
pythagoras[0:t1]

2nd quote
t2 = pythagoras.find(".")
pythagoras[t1+2:t2]

author's name
t3 = pythagoras.find("-")
pythagoras[t3+1:]

Split
'This is a fox',  ' it is hungry', ' it is running home.'
This is a fox
it is hungry
it is running home.
This is a fox, it is hungry, it is running home.

Exercise 3
def F2C(farenheit):
"function: returns results in celsius"
celsius = ((int(farenheit)-32)*5)/9
print(celsius,"C")

Exercise 4
def biggest(a,b,c):
"function:to get the largest value out of 3 inputs"
if (a >= b) and (a >= c):
largest = a
elif (b >= a) and (b >= c):
largest = b
else:
largest = c

print(largest)

# data[].attributes.body
d d
G G
Go o
o o
g g

exercise 2
Good Morning
Good Morning
Good Mornin
Good Morning
Good Morning

# Slice the profession.
profession_index =data_vs_info.find('science')
print (data_vs_info[profession_index:])

# Slice the quote only
quote_index =data_vs_info.find('~')

print (data_vs_info[:quote_index])

Task 1

#First Part
index_phy_com = pythagoras.find (',')
print (pythagoras[:index_phy_com])

#Second Part
index_phy_second =  pythagoras.find ('.')
print (pythagoras[index_phy_com + 2 :index_phy_second])

#Third Part
index_author =  pythagoras.find ('-')
print (pythagoras[index_author+1:])

['This is a fox', ' it is hungry', ' it is running home.']
This is a fox
it is hungry
it is running home.
This is a fox, it is hungry, it is running home.

# data[].attributes.body
1. 'This is a fox' , 'it is hungry' , 'it is running home.'
2. This is a fox
3. it is hungry
4. it is running home
5. 'This is a fox , it is hungry , it is running home.'

# data[].attributes.body
// SUBMIT YOUR ANSWER HERE

# data[].attributes.body
Name & Age:

Job/Company:

What's your motivation?:

What's your expectation?:

What do you hope to gain from this 17 weeks bootcamp?:

# data[].attributes.body
def checksum(num1,num2):
"return sum of two integer. however, if the sum between 15 and 20 it will return 20"
total  = num1 + num2
if total>=15 and total<=20:
return 20
else:
return total

print(checksum(9,9))
print(checksum(20,-2))
print(checksum(-2,50))