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