About 40,300,000 results
Open links in new tab
  1. python - Asking the user for input until they give a valid response ...

    Apr 25, 2014 · How do I ask for valid input instead of crashing or accepting invalid values (e.g. -1)? The simplest way to accomplish this is to put the input method in a while loop. Use …

  2. Yes/No question with user input in Python - bobbyhadz

    To ask the user a yes/no question: Use the input() function to take input from the user. Perform an action if either condition is met. We used the input() function to take input from the user. The if …

  3. How To Ask The User A Question In Python - python-hub

    Here’s how you How to ask the user a question in Python. But, how will you get to know that python is asking you your name if you haven’t written this code? The program’s user won’t …

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

    To ask for user input in Python, use the input () function. For example, to ask a number, user_number = input ("Enter a number: ")

  5. Guide: Yes/No question with user input in Python - Medium

    Apr 30, 2023 · In Python, you can easily ask users to answer yes or no questions. In this guide, we will show you how to create a yes/no question with user input in Python. Start by creating a …

  6. Build a Quiz Application With Python

    Feb 2, 2025 · In this tutorial, you’ll build a Python quiz application for the terminal. You’ll start by developing a basic app capable of asking questions, collecting answers, and checking …

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

    Dec 14, 2021 · To create a multiple-choice question in Python, you can use a function to display the question and its choices, and then check the user’s input against the correct answer. …

  8. i dont know how to make a yes or no question in python and ... - Reddit

    Aug 8, 2021 · Just in case the OP doesn’t know, by adding .lower () to the answer it converts the input from the user to lowercase, so even if they have caps lock on it doesn’t matter. Also, as …

  9. Ask user to input a correct response in Python? - Stack Overflow

    Find the answer to your question by asking. I am a newbie programmer and am trying to code a program where I ask the user for a specific input like Obama, Clinton or Bush and congratulate …

  10. Mastering Yes/No Prompts: Techniques for Handling User Input in Python

    Creating Yes/No prompts with user input in Python is a simple but essential skill for any programmer. With the techniques presented in this article, you can handle variations in user …

Refresh