subject

I need to make this code work where it will print the 'I was also thinking about...' when I guess the correct number, at the moment when I guess the correct number it still prints as if I got it wrong. import random
num = random. randint(1,3)
# 9
answer = input("Pick a number from 1 to 3: ")
# hint: will the following if statment ever be executed even when the values of answer and num are the same? If not, can you fix the problem?
# hint: the error is not necessarily in the line below
if answer == num:
print("I'm also thinking about {} ".format(num))
print("You woke up from this dream.")
elif answer != num:
print("You fall into deep sand and get swallowed up. You lost!")
else:
print("You can't run away...")

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
What can tanya do now to start preparing for the college and scholarship application process? think about her grades, activities in which she can get involved, possible part-time jobs at which she can work, and standardized tests she can take. (10 points) apex
Answers: 2
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Per the municipal solid waste report, what are the most common sources of waste (trash
Answers: 3
You know the right answer?
I need to make this code work where it will print the 'I was also thinking about...' when I guess th...
Questions
question
Biology, 20.11.2020 22:30
question
Mathematics, 20.11.2020 22:30
question
Advanced Placement (AP), 20.11.2020 22:30
question
Chemistry, 20.11.2020 22:30
question
Mathematics, 20.11.2020 22:30
question
Mathematics, 20.11.2020 22:30
Questions on the website: 13722363