Programming For Everybody (Getting Started With Python) - Home - Coursera - 3 PDF
Programming For Everybody (Getting Started With Python) - Home - Coursera - 3 PDF
1/1
point
1.
What do we do to a Python statement that is immediately after an if statement to indicate that the
statement is to be executed only when the if statement is true?
1/1
point
2.
Which of these operators is not a comparison / logical operator?
1/1
point
3.
What is true about the following code segment:
1 if x == 5 :
2 print('Is 5')
3 print('Is Still 5')
4 print('Third 5')
1/1
point
4.
When you have multiple lines in an if block, how do you indicate the end of the if block?
1/1
point
5.
https://www.coursera.org/learn/python/exam/63qwZ/chapter-3 1/3
03/05/2019 Programming for Everybody (Getting Started with Python) - Home | Coursera
It looks perfect but Python is giving you an 'Indentation Error' on the second print statement. What is the
most likely reason?
1/1
point
6.
What is the Python reserved word that we use in two-way if tests to indicate the block of code that is to be
executed if the logical test is false?
1/1
point
7.
What will the following code print out?
1 x = 0
2 if x < 2 :
3 print('Small')
4 elif x < 10 :
5 print('Medium')
6 else :
7 print('LARGE')
8 print('All done')
1/1
point
8.
For the following code,
1 if x < 2 :
2 print('Below 2')
3 elif x >= 2 :
4 print('Two or more')
5 else :
6 print('Something else')
1/1
point
https://www.coursera.org/learn/python/exam/63qwZ/chapter-3 2/3
03/05/2019 Programming for Everybody (Getting Started with Python) - Home | Coursera
9.
Chapter 3
In questions
the following code (numbers added) - which will be the last line to execute successfully? 10/10 points (100%)
Quiz, 10
1/1
point
10.
For the following code:
What will the value be for istr after this code executes?
https://www.coursera.org/learn/python/exam/63qwZ/chapter-3 3/3