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

Practice Quiz

1. What is the type of the following: 0

  • Int
  • float

2. What is the type of the following number: 3.12323

  • Int
  • Float

3. What is the result of the following: int(3.99)

  • 3
  • 3.99

4. What is the result of the following operation: 11//2

  • 5
  • 5.5

5. What is the value of x after the following is run:

x=4

x=x/2

  • 4.0
  • 2.0

6. What is the result of the following: Name[0]

  • “i”
  • “n”
  • “M”

7. What is the result of the following: Name[-1]

  • “n”
  • “o”
  • “M”

8. What is the output of the following: print("AB\nC\nDE")

  • AB

    C

    DE

  • ABC

    DE

  • AB

    CD

    E

Shuffle Q/A 1

9. What is the result of following?

"hello Mike".find("Mike")

If you are unsure, copy and paste the code into Jupyter Notebook and check.

  • 6
  • 6,7,8
  • 5

Module 1 Graded Quiz

10. What is the value of x after the following lines of code?

x=2

x=x+2

  • 4
  • 2

Leave a Reply