Python Functions, Objects & Classes Quiz What is a class in Python? A blueprint for an object A built-in function A loop that runs functions A collection of functions What symbol is used to start the block of code inside a function in Python? () {} [] : What will be the output of the following code? def say_hello(): print(‘Hello, Python!’) say_hello() Error say_hello Hello, Python! No output What is a class in Python? A set of built-in functions A type of function A blueprint for an object A function that stores variables What is an object in Python? A function that stores data A blueprint for a class A collection of data (variables) and methods (functions) A method inside a function In Python, which of the following is NOT a built-in function? print() min() average() sum() What is a function in Python? A block of code that runs only when called A loop structure A block of code that runs automatically A pre-defined set of statements Which of the following is an example of calling a function in Python? greet{} call greet greet() def greet() What analogy is used in the lecture to describe a class? A book and its chapters A construction map of a house A tree and its leaves A blueprint of a machine Which of the following is a correct way to define a function in Python? def myFunction: function myFunction(): define myFunction(): def myFunction(): Loading …