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