Coursera Programming for Everybody-Getting Started with Python-Week 4 Chapter 2- quiz answers

 


These solutions are for reference only.

It is recommended that you should solve the assignment and quiz by yourself honestly then only it makes sense to complete the course.

but if you cant figure out some part of it than you can refer these solutions

make sure you understand the solution  

dont just copy paste it

-----------------------------------------




1.) In the following code, print 98.6. What is “98.6”?


answer-  A constant



2)In the following code, x = 42. What is “x”?

A variable



3)Which of the following variables is the “most mnemonic”?

hours



4)Which of the following is not a Python reserved word?

speed



5)Assume the variable x has been initialized to an integer value (e.g., x = 3). What does the following statement do? x = x + 2

Retrieve the current value for x, add two to it and put the sum back into x



6)Which of the following elements of a mathematical expression in Python is evaluated first?

–Parenthesis()


7)What is the value of the following expression

2


8)What will be the value of x after the following statement executes: x = 1 + 2 * 3 – 8 / 4

5



9)What will be the value of x when the following statement is executed: x = int(98.6)

98



10)What does the Python raw_input() function do?

Pause the program and read data from the user


----------------------------


reference :coursera.org

darkmode