python for data science ai & development coursera week 3 quiz answers

Practice Quiz

1. what is the result of the following: 1=2

  • False
  • True
  • SyntaxError:can’t assign to literal

2. What is the output of the following code segment:

i=6

i<5

  • True
  • False
  • SyntaxError: can’t assign to literal

3. What is the result of the following: 5!=5

  • False
  • True

4. What is the output of the following code segment: 'a'=='A'

  • False
  • True

5. in the video, if age=18 what would be the result

  • move on
  • you can enter

6. in the video what would be the result if we set the variable age as follows: age= -10

  • o see Meat Loaf

    move on

  • you can enter

    move on

7. what is the result of the following: True or False

  • True, an or statement is only False if all the Boolean values are False
  • False

8. what will be the output of the following:

for x in range(0,3):

print(x)

  • 0

    1

    2

  • 0

    1

    2

    3

Shuffle Q/A 1

9. what is the output of the following:

for x in ['A','B','C']:
print(x+'A')

  • AA

    BA

    CA

  • A

    B

    C

10. what is the output of the following:

for i,x in enumerate(['A','B','C']):

print(i,x)

  • 0 A

    1 B

    2 C

  • AA

    BB

    CC

Leave a Reply