Python Programming Quiz – print() and input() functions 1. How do you display the text: I love Python? print(I love Python) print('I love Python') display('I love Python') input('I love Python') 2. Which of the following statements will produce an error? print("Hello" + "World") print(10 + 20) print("5" + "6") print("Age: " + 25) 3. What is the correct syntax to display “Hello, World!” in Python? display("Hello, World!") echo("Hello, World!") printf("Hello, World!") print("Hello, World!") 4. What will be the output of the following code? print(5 + 3) Error 53 5 + 3 8 5. What is the default end character in the print() function? \n (newline) ; (semicolon) . (dot) , (comma) 6. Which of the following is used to get user input in Python? print() output() get() input() 7. What will be the output of the following code if the user enters Python? language = input(“Favorite language: “) print(“You like”, language) You like Favorite language: Python You like Python Python 8. What will the following code do? name = input(“Enter your name: “) print(name) Print “Enter your name:” only Show an error Only take user input without displaying it Take user input and display it 9. Which of the following is NOT true about the print() function? It is used to take user input It can display text on the screen It can display variable values It can perform mathematical calculations 10. How can you prevent the print() function from moving to a new line after output? print("Hello", stop=" ") print("Hello", end=" ") print("Hello", skip=" ") print("Hello", next=" ") Loading …