subject

Please help me! will mark brainliest! Hi! i need help identifying an error in the following code:

Please tell me what i did wrong!!!

import random

number = random. randint(1,10)

tried = 0

uname = input("enter your name:")

uname = uname. strip()

print(f"hello! {uname}")

print("would you like to play a game?")

print("1) yes")

print("2) no")

option = input("select your option:")

option = int(option)

if option == 1:

print("i\'m thinking of a number between 1 and 10")

print("you have to guess the number within 3 tries")

guess = input("guess the number:")

guess = int(guess)

tries+=1

if guess>number:

print("guess lower...")

if guess number:

print("guess lower...")

if guess

option = int(option)

it is saying this:

ValueError: invalid literal for int() with base 10: 'no'

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:00, ruddymorales1123
What allows you to create a wireless connection among your smart devices
Answers: 2
image
Computers and Technology, 22.06.2019 21:30, aesthetickait
How do you take a green screen out of the video while editing?
Answers: 2
image
Computers and Technology, 24.06.2019 09:30, kyreesegordon
Retype the statements, correcting the syntax errors. system. out. println("num: " + songnum); system. out. println(int songnum); system. out. println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
Answers: 1
image
Computers and Technology, 25.06.2019 12:00, keaton846
Bachelor’s degrees are typically earned in a. 1-2 years b. 2-3 years c. 3-4 years d. 4-5 years
Answers: 1
You know the right answer?
Please help me! will mark brainliest! Hi! i need help identifying an error in the following code:

Questions in other subjects:

Konu
Mathematics, 23.02.2021 03:00
Konu
Mathematics, 23.02.2021 03:00
Konu
History, 23.02.2021 03:00