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