subject

Need 2.5 code practice answers

copy and paste the following code into the sandbox window. modify the code so that user is asked to multiply two random numbers from 1 to 10 inclusive.

import random
random. seed()

# todo: update the following two lines with a call to a function
# from the random library that generates a random number between
# 1 and 10, inclusive.
a = 6 # hint: replace 6 with a function call
b = 3 # hint: replace 3 with a function call

print ("what is: " + str(a) + " x " + str(b) + "? ")
ans = int(input("your "))
if (a * b == ans):
print ("correct! ")
else:
print ("incorrect! ")

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:30
The method of presentation refers to the planning process for the presentation. the information chosen for the presentation. how the presentation topic will be introduced. how the presentation will be delivered.
Answers: 1
question
Computers and Technology, 22.06.2019 11:30
To hide gridline when you display or print a worksheet
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
What is outfitting a workplace with video in a technology
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
This graph compares the cost of room and board at educational institutions in texas.
Answers: 1
You know the right answer?
Need 2.5 code practice answers

copy and paste the following code into the sandbox window...
Questions
question
Mathematics, 11.04.2021 08:20
question
Mathematics, 11.04.2021 08:20
question
Social Studies, 11.04.2021 08:20
question
Mathematics, 11.04.2021 08:20