subject

Edhesive 2.5 coding practice (we are using python)

i have to copy and paste the following code and modify the code so that it asks the user to multiply two random numbers from 1 to 10 inclusive. i am unsure how to do this.

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: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 22:30
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
Answers: 1
question
Computers and Technology, 25.06.2019 01:30
What controls can be found on the file tab of microsoft word
Answers: 1
question
Computers and Technology, 25.06.2019 02:30
How to delete a question in
Answers: 2
question
Computers and Technology, 25.06.2019 05:00
Carmina works at a fast-food restaurant. during the slow afternoon hours, carmina always find projects to keep her busy, like washing all the trays or deep-cleaning the drive-thru area. what workplace habit does carmina show by doing this? efficiency initiative interpersonal skills problem solving
Answers: 1
You know the right answer?
Edhesive 2.5 coding practice (we are using python)

i have to copy and paste the following...
Questions
question
Mathematics, 29.10.2019 09:31
question
History, 29.10.2019 09:31
question
Mathematics, 29.10.2019 09:31
Questions on the website: 13722362