Question

Create a python program that will keep asking the user for the correct username, until he...

Create a python program that will keep asking the user for the correct username, until he give the correct one?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

# set any of the username you like
username = "HomeworkLib"

# taking input for the first
uname = input("Enter username: ")

# as long as it is incorrect, asking again
while uname != "HomeworkLib":
uname = input("That's incorrect. Try agian: ")

# once it is correct, comes here
print("Done!")

# Hit the thumbs up if you are fine with the answer. Happy Learning!

Add a comment
Know the answer?
Add Answer to:
Create a python program that will keep asking the user for the correct username, until he...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • in python 5.23 Login Create a program that prompts the user for a username and password....

    in python 5.23 Login Create a program that prompts the user for a username and password. The correct username should be python and the correct password should be csci 135. See below for example output. (Different messages depending on if user name or password are correct.) Only allow the user to make 3 attempts. Welcome to my secret program! Please enter your username: Trish Please enter your password: Duce Invalid username and password Please enter your username: Trish Please enter...

  • Write a complete program that will prompt the user for an integer You must keep asking...

    Write a complete program that will prompt the user for an integer You must keep asking the user until they give you a number that is greater than 700. Once they give a valid number, display all multiples of 7 from 7 to that number inclusively). You may assume the user will give you correct type of input, but your code must continue to prompt them until they give a number greater than 700.

  • Using Python, write a program that keeps asking the user for text until they type "exit"...

    Using Python, write a program that keeps asking the user for text until they type "exit" To Exit Or Not Write a program that keeps asking the user for text until they type "exit" Console 1 Enter number 1 3 Enter number 5 5 Enter number 7 Enter number 8 1 9 Enter number 10 9 11 Enter number 12 3 13 Enter number 14 4 15 Enter number 16 exit 17 Bye! 18

  • Using java program, create a Username class. ask user to type username 1)username length have to...

    Using java program, create a Username class. ask user to type username 1)username length have to >1 and <15 2)username can not include any special character (ex.!@##$}{|\....) ,but it also have to type Spanish or other foreign language 3)user can not include any empty space (ex. user name) all of three error have to print out. and if there is any error contains, have to ask user to input user name again. for example: input username: #$%he f username can't...

  • Create a program in Python that will allow the user to enter a temperature in Fahrenheit...

    Create a program in Python that will allow the user to enter a temperature in Fahrenheit which will then be converted to degrees Celsius. The program will keep asking the user for a Fahrenheit temperature until the user enters Q to quit. After each conversion the program needs to print out the degrees Celsius. The input prompts for this problem need to look like the following: Degrees Fahrenheit: Continue: For these input prompts watch the capitalization and spacing. There are...

  • Build a list by asking the user to enter names until the user enters "done". #...

    Build a list by asking the user to enter names until the user enters "done". # Build a list which contains all numbers divisible by 3 between (exclusive) and 100 (exclusive) Write a Python program that builds a list consisting of positive even numbers less than 150 (exclusive) Write a Python program that builds a list of numbers between -10 (inclusive) to 10 (inclusive) without the number @ 5 Calculations using lists

  • Write a java program that keeps asking the user to enter a number until the user...

    Write a java program that keeps asking the user to enter a number until the user quits and prints how many even and how many odd numbers entered by the user. The loop terminates if the user enters -1 (it indicates that there will be no more number entering by the user). In other words, as long as the user doesn’t enter -1, the loop will be executed. Please add comments to the program to understand/ explain the code.

  • Python Write a program which asks the user keep inputting values on a line followed by...

    Python Write a program which asks the user keep inputting values on a line followed by enter until they enter a blank line, at which point the program should print the number of lines entered (excluding the blank).

  • [PYTHON] Create a chatbot program in Python: a program that appears to talk intelligently to a...

    [PYTHON] Create a chatbot program in Python: a program that appears to talk intelligently to a human using text. Your program should involve asking the user questions and having the computer respond in a reasonably intelligent fashion based on those answers. For example, here is a sample chat: ChatBot: Welcome, I am Chatbot . What is your name? User: My name is Abby . ChatBot: Hello Abby. How old are you? User: 22. <---- Input ChatBot: That is older than...

  • Write a Python (3) program to simulate** a buffer overflow (this is a new script, not...

    Write a Python (3) program to simulate** a buffer overflow (this is a new script, not part of the intranet assignment), then implement input validation to prevent it. There are two parts to this assignment: 1) The program should display a welcome message and prompt the user for a username. Create a simulated buffer overflow condition by allowing a user to input more data than the size of the allocated memory (causing the program to crash). 2) Implement input validation...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT