Programming For Everybody (Getting Started With Python) - Home - Coursera - 4 PDF
Programming For Everybody (Getting Started With Python) - Home - Coursera - 4 PDF
1/1
point
1.
Which Python keyword indicates the start of a function de nition?
1/1
point
2.
In Python, how do you indicate the end of the block of code that makes up the function?
1/1
point
3.
In Python what is the input() feature best described as?
1/1
point
4.
What does the following code print out?
1 def thing():
2 print('Hello')
3
4 print('There')
1/1
point
5.
https://www.coursera.org/learn/python/exam/BZDBl/chapter-4 1/3
03/05/2019 Programming for Everybody (Getting Started with Python) - Home | Coursera
1/1
point
6.
What will the following Python code print out?
1 def func(x) :
2 print(x)
3
4 func(10)
5 func(20)
1/1
point
7.
Which line of the following Python program will never execute?
1 def stuff():
2 print('Hello')
3 return
4 print('World')
5
6 stuff()
1/1
point
8.
What will the following Python program print out?
1 def greet(lang):
2 if lang == 'es':
3 return 'Hola'
4 elif lang == 'fr':
5 return 'Bonjour'
6 else:
7 return 'Hello'
8
9 print(greet('fr'),'Michael')
1/1
point
https://www.coursera.org/learn/python/exam/BZDBl/chapter-4 2/3
03/05/2019 Programming for Everybody (Getting Started with Python) - Home | Coursera
9.
Chapter 4 the following Python code print out? (Note that this is a bit of a trick question and10/10
What does the code has
points (100%)
Quiz, 10 questions
what many would consider to be a aw/bug - so read carefully).
1/1
point
10.
What is the most important bene t of writing your own functions?
https://www.coursera.org/learn/python/exam/BZDBl/chapter-4 3/3