About 20,400,000 results
Open links in new tab
  1. Different outputs based on responses to multiple questions (Python)

    Feb 25, 2015 · I am trying to create a questionnaire where it asks multiple yes/no questions, and after receiving all of the responses a different output is shown depending on the combination …

  2. How do I ask multiple questions in python? - Stack Overflow

    I'm currently developing a very simple phone troubleshooting system with python which should include 10 possible outcomes. I have created the flowchart below to help me with the process …

  3. python - How to sucsessfully ask the user to choose between two options ...

    Nov 13, 2016 · inp = input("Choose 1 or 2 ") if inp == "1": print("You chose one") # whatevercodeyouwant_1() elif inp == "2": print("You chose two") # whatevercodeyouwant_2() …

  4. How to make a multiple-choice question in Python | Example

    Dec 14, 2021 · Here’s the Python syntax for creating a multiple-choice question: def multiple_choice_question(question, choices, correct_answer): """ Function to display a multiple …

  5. Using user input to Select an Option from a List in Python

    Apr 9, 2024 · To define a multiple-choice question with user input: Use the input() function to take input from the user. Check if the input is one of the specified choices. Use conditional …

  6. Python 3.6+ function to ask for a multiple-choice answer

    Mar 8, 2019 · I created a template to ask a multi choice question in python. The loop will never reach it's end, since there is always a continue or a return statement. Is the while True …

  7. How to Make a Choice in Your Python Program - The Renegade …

    Jun 11, 2021 · In this case, there are two pieces of information I want you to keep an eye on. First, the if keyword is followed by a condition. Put simply, a condition is any expression that …

  8. How to Take Continuous Input in Python? - Python Guides

    Jun 18, 2023 · Taking continuous input in Python means that the program keeps asking the user for input until a certain condition is met. This is typically achieved using loops. In this Python …

  9. How to Ask for User Input in Python: A Complete Guide

    To ask for user input in Python, use the built-in input() function. For example: name = input("Enter your name: ") print(f"Hello {name}") Output example: Enter your name: Jack Hello Jack. In …

  10. Build a Quiz Application With Python

    Feb 2, 2025 · You’ll build the quiz application iteratively by going through the following steps: Create a basic application that can ask multiple-choice questions. Make the app more user …

Refresh