Module quiz: Programming Paradigms Quiz Answers
In this article i am gone to share Coursera Course: Programming in Python by Meta Week 3 | Module quiz: Programming Paradigms Quiz Answers with you..
Module quiz: Programming Paradigms Quiz Answers
Question 1)
Which of the following can be used for commenting a piece of code in Python? (Select all that apply)
- (”’ ”’) – Triple quotation marks
- ( @ ) – At the rate sign
- ({ }) – Curly Brackets
- · ( # ) – Hashtag *
Question 2)
What will be the output of running the following code?
value = 7 class A: value = 5 a = A() a.value = 3 print(value)
- None of the above
- 7
- 3
- 5
Question 3)
What will be the output of running the following code?
bravo = 3 b = B() class B: bravo = 5 print("Inside class B") c = B() print(b.bravo)
- 5
- None
- 3
- Error
Question 4)
Which of the following keywords allows the program to continue execution without impacting any functionality or flow?
- break
- pass
- skip
- continue
Question 5)
Which of the following is not a measure of Algorithmic complexity?
- Logarithmic Time
- Exponential Time
- Constant time
- Execution time
Question 6)
Which of the following are the building blocks of Procedural programming?
- Procedures and functions
- All of the options.
- Objects and Classes
- Variables and methods
Question 7)
True or False: Pure functions can modify global variables.
- True
- False
Question 8)
Which of the following is an advantage of recursion?
- Recursive code can make your code look neater
- Easy to debug
- Recursion is memory efficient
- Easier to follow