PYTHON QUIZ 2 7 Created on May 24, 2020 By Sirjana GhimireAcharya PYTHON QUIZ 2 1 / 10 In Python, what is one function to output content to the console? echo output print console.log 2 / 10 2. Which of the following statements is NOT true about Python? Python’s syntax is much like PHP Python can be used for web development Python can run on any type of platform Python can be used to generate dynamic web pages 3 / 10 3. What can you put before and after a section to make all of the lines a comment? ”’ /// ### (comment) 4 / 10 4. How do you create a variable “a” that is equal to 2 var a = 2 int a = 2 a = 2 variable a = 2 5 / 10 5. Which one is NOT a legal variable name? my-var _myvar Myvar my_var 6 / 10 6. How do you create a variable with the numeric value 10? Both the other answers are correct x = 10 x = int(10) 7 / 10 7. What is the correct file extension for Python files? .py .pt .pyth .pyt 8 / 10 8. How do you create a variable with the floating number 3.8? Both the other answers are correct x = float(3.8) x = float(3.8) 9 / 10 9. What is the correct syntax to output the type of a variable or object in Python? print(typeof x) print(type(x)) print(typeOf(x)) print(typeof(x)) 10 / 10 10. What is the correct way to create a function in Python? function myfunction(): create myFunction(): def myFunction(): Your score is The average score is 64% LinkedIn Facebook Twitter 0% Restart quiz