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 11:30
What do character formats do for your document's message? a.set the tone b.provide organization c.provide clarity d.set how texts align with documents
Answers: 2
question
Computers and Technology, 22.06.2019 12:00
Which of the following “invisible” marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
question
Computers and Technology, 23.06.2019 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
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
Mathematics, 19.04.2021 22:40
question
Mathematics, 19.04.2021 22:40
question
Mathematics, 19.04.2021 22:40
question
Mathematics, 19.04.2021 22:40
Questions on the website: 13722362