menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
You wrote a program to allow the user to guess a number. Complete the code to generate a random integer between one and 10. from random import randint # Generate and save a random number correct
asked
Sep 16, 2022
112k
views
4
votes
You wrote a program to allow the user to guess a number. Complete the code to generate a random integer between one and 10.
from random import randint
# Generate and save a random number
correct
Computers and Technology
high-school
Ryan Carter
asked
by
Ryan Carter
5.5k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
if we are talking about python
from random import randint
x = random.randint(1,10)
y = input(“enter a guess”)
if x == y:
print(“correct”)
else:
print(“incorrect, the answer was “, x)
Luntegg
answered
Sep 21, 2022
by
Luntegg
4.9k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
5.6m
questions
7.3m
answers
Other Questions
A new information system is not considered in production until conversion is complete
a. STOP: What is a technology habit you practice today that you now realize will not help you to be successful? Explain why it’s important to STOP doing this right now.
Why might the government censor what its citizens see on the internet?
Flash drives cds external disks are all examples of storage (memory) devices
What is a spreadsheet program? A spreadsheet program is a computerized version of _________
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org