jennifer_bentley
jennifer_bentley Sep 2, 2026 • 10 views

Multiple Choice Questions on Python Input and Output

Hey there! 👋 Learning Python input and output? I've got you covered with a quick study guide and a practice quiz to help you ace it! Let's get started! 🚀
💻 Computer Science & Technology
🪄

🚀 Can't Find Your Exact Topic?

Let our AI Worksheet Generator create custom study notes, online quizzes, and printable PDFs in seconds. 100% Free!

✨ Generate Custom Content

1 Answers

✅ Best Answer
User Avatar
patrick961 Dec 30, 2025

📚 Quick Study Guide

  • ⌨️ The input() function is used to get input from the user. It always returns a string.
  • 🔢 To read integers, use int(input()). Similarly, use float(input()) for floating-point numbers.
  • 🖨️ The print() function is used to display output to the console.
  • 🔗 You can format output using f-strings: print(f"The value is: {variable}").
  • ✨ You can also use the .format() method for string formatting: print("The value is: {}".format(variable)).
  • ✂️ The sep argument in print() specifies the separator between the arguments (default is space). Example: print("Hello", "World", sep="-") outputs Hello-World.
  • The end argument in print() specifies what to print at the end of the output (default is newline). Example: print("Hello", end="!").

🧪 Practice Quiz

  1. Which function is used to get input from the user in Python?
    1. A. output()
    2. B. read()
    3. C. input()
    4. D. get()
  2. What data type does the input() function return?
    1. A. int
    2. B. float
    3. C. string
    4. D. boolean
  3. How do you convert the input from the user to an integer?
    1. A. str(input())
    2. B. float(input())
    3. C. int(input())
    4. D. input().int()
  4. Which of the following is the correct way to print "Hello, World!" using f-strings, assuming name = "World"?
    1. A. print(f"Hello, {name}!)"
    2. B. print("Hello, {name}!")
    3. C. print(f"Hello, name!")
    4. D. print("Hello, " + name + "!")
  5. What does the sep argument in the print() function do?
    1. A. Specifies the end of the output.
    2. B. Specifies the separator between the arguments.
    3. C. Specifies the beginning of the output.
    4. D. Specifies the format of the output.
  6. What does the end argument in the print() function do?
    1. A. Specifies the separator between the arguments.
    2. B. Specifies the beginning of the output.
    3. C. Specifies what to print at the end of the output.
    4. D. Specifies the format of the output.
  7. What will be the output of the following code? print("One", "Two", "Three", sep=", ", end="!")
    1. A. One Two Three
    2. B. One, Two, Three
    3. C. One, Two, Three!
    4. D. One Two Three!
Click to see Answers
  1. C
  2. C
  3. C
  4. A
  5. B
  6. C
  7. C

Join the discussion

Please log in to post your answer.

Log In

Earn 2 Points for answering. If your answer is selected as the best, you'll get +20 Points! 🚀