All Coursera Quiz Answers

Module quiz: Getting started with Python Quiz Answers

In this article i am gone to share Coursera Course: Programming in Python by Meta Week 1 | Module quiz: Getting started with Python Quiz Answers with you..

 

Module quiz: Getting started with Python Quiz Answers

Question 1)
Python is a dynamically typed language. What does this mean?

  • Python does not require a type for a variable declaration. It automatically assigns the data type at run time.
  • Python requires you to explicitly set the correct data type and value before assigning a variable.
  • Python requires that you specify the type of variable before it being assigned.
  • Python supports both functional and object oriented programming.

Question 2)
How do you create a block in Python?

  • A block is created using a colon following by a new line and indentation
  • A block is created by a new line
  • A block is created using a semi colon and a new line
  • A block is created using a semi colon and indentation

Question 3)
When declaring variable in Python, can a variable name contain white space?

  • Yes
  • No

Question 4)
How can a variable be deleted in python?

  • The del keyword
  • The def keyword
  • The remove keyword
  • A variable cannot be deleted

Question 5)
In Python, how can you convert a number to a string?

  • int()
  • float()
  • str()
  • enumerate()

Question 6)
An Integer – int in Python can be converted to type Float by using the float function?

  • True
  • False

Question 7)
What is the purpose of break in a for loop in Python?

  • The break keywork is used to debug a for loop.
  • It controls the flow of the loop and stops the current loop from executing any further.
  • To terminate the code
  • The break statement will suspend the code until continue is run.

Question 8)
An enumerate function is used to provide the index of the current iteration of a for loop.

  • True
  • False

Question 9)
What will be the output of the code below:

a = isinstance(str, "aa")
print(a)
  • It will throw an error.
  • “aa”
  • False

Question 10)
Select all the valid input() formats among the following. Select all that apply

  • name = input(“What is your name? “)
  • input()
  • input(“”)
  • “” = input(“My name is: ” + name)