Computers and Technology
Computers and Technology, 24.10.2019 20:43, olguita82

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! ")

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:10, shimmerandshine1
When you reach a yield sign, yield to cross traffic and before you enter the intersection. a. flash your headlights b. wait for a signal c. wait five seconds d. wait for a safe gap
Answers: 1
image
Computers and Technology, 23.06.2019 05:00, sharkboy578
Acompany is inviting design for its new corporate logo from its users. this is an example of ? a. crowdfunding b. crowdvoting c. crowdsourced design d. crowdtracking
Answers: 3
image
Computers and Technology, 23.06.2019 07:30, kimhoss2
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, jason9394
Facial expressions and gestures are examples of messages.
Answers: 3
Do you know the correct answer?
Edhesive 2.5 coding practice (we are using python)

i have to copy and paste the following...

Questions in other subjects:

Konu
Mathematics, 22.02.2021 05:40
Konu
Mathematics, 22.02.2021 05:40