Ask coding questions

← Back to all posts
i need help
TaylorRichardso (0)

i not understanding how my teacher wants me to do this

Bookie0 (5956)

What do you need exactly? Can you precise your question? Also, what have you tried? What is going wrong? What do you think is causing the problem, and what do you think could solve it?

According to the first lines in your program, you want to create a guessing game.

We can't directly give you the code, but here's an outline of what you can do. First, you'll need a variable which generates a random number, or set the variable to a number. Then, you can use input() to ask the user to guess. With conditionals (if, elif, else), you can check if that guess is equal to that number, as well as if it's bigger or smaller. If it's bigger, then you can tell the user to guess higher, and vice-versa.

Try to do it, and if you still need help, lemme know! :D Good luck!

dumbCodr (4)

He wants you to write a program that thinks of a number, then asks the user to guess it, and tell the user wheather they were to high or too low, if they cant guess the number within 7 turns make the computer tell them they lost and reveal the number

Coder100 (16841)

give more context first