#Sam Ola
#10/2/2021
#in this lesson i learned how to use def to define functions
#I had some trouble on task 3 with the part "Call yell_this() with words_to_yell as argument" because i was confused on that part
print('Hello World!', 'I am sending string arguments to print ')
student_age = 17
student_name = "Hiroto Yamaguchi"
print(student_name,'will be in the class for',student_age, 'year old students.')
print("line 1")
print("line 2")
# line 3 is an empty return - the default when no arguments
print()
print("line 4")
student_age = 17
student_name = "Hiroto Yamaguchi"
print(student_name,'will be in the class for',student_age, 'year old students.')
print(student_name,"is one of the",student_age,'year old students.')
print(student_name, "has 3 siblings")
print(student_name, 'was born on January',student_age)
print(student_name, 'will turn 18 this year')
print(student_name, "likes the color red")
print(student_name, 'has 7 friends')
print(student_name, 'loves pizza')
print(student_name, 'hates peanuts')
# defines a function named say_hi
def say_hi():
print("Hello there!")
print("goodbye")
# define three_three
def three_three():
print(33)
# Program defines and calls the say_hi & three_three functions
# [ ] review and run the code
def say_hi():
print("Hello there!")
print("goodbye")
# end of indentation ends the function
# define three_three
def three_three():
print(33)
# calling the functions
say_hi()
print()
three_three()
phrase = "i like cheese!"
print(phrase.upper())
def yell_it():
print(phrase)
# yell_this() yells the string Argument provided
def yell_this(phrase):
print(phrase.upper() + "!")
# call function with a string
yell_this("It is time to save the notebook")
# use a default argument
def say_this(phrase = "Hi"):
print(phrase)
say_this()
say_this("Bye")
def words_to_yell(phrase = "where are you from"):
print(input(phrase))