1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elanso [62]
3 years ago
12

Can anyone tell me what wrong with this code the instructions are "Currently, this program will add 6 and 3 together, output the

math problem and output the answer. Edit this code so that a random number is generated from 1 - 10 (inclusive) for the variables a and b. Also, instead of adding the two numbers together, the edited program should multiply them, and output the proper math problem and answer. Be sure to update every line of code to reflect the changes needed." My code runs but it hasa EOF. My code is
import random
random.seed(1,10)
a = random.randint (1,10)
b = random.randint (1,10)
print ("What is: " + str(a) + " X " + str(b) + "?")

ans = int(input("Your answer: "))

if (a * b == ans):
print ("Correct!")
else:
print ("Incorrect!")
Computers and Technology
1 answer:
atroni [7]3 years ago
4 0

Answer:

import random

a = random.randint(1,10)

b = random.randint(1,10)

answer = a * b

print(str(b)+" * "+str(a)+" = "+str(answer))

Explanation: So I am guessing you are on Edhesive Module 2.5 Intro to cs. Sorry it took so long but hopefully this works.

You might be interested in
computer has a 32-bit instruction word broken into fields as follows: opcode, six bits; two register file address fields, five b
lina2011 [118]

Answer:

a.  2^6, or 64 opcodes.

b.  2^5, or 32 registers.

c. 2^16, or 0 to 65536.

d.  -32768 to 32768.

Explanation:

a. Following that the opcode is 6 bits, it is generally known that the maximum number of opcodes should be 2^6, or 64 opcodes.

b. Now, since the size of the register field is 5 bits, we know that 2^5 registers can be accessed, or 32 registers.

c. Unsigned immediate operand applies to the plus/minus sign of the number. Since unsigned numbers are always positive, the range is from 0 to 2^16, or 0 to 65536.

d. Considering that the signed operands can be negative, they need a 16'th bit for the sign and 15 bits for the number. This means there are 2 * (2^15) numbers, or 2^16. However, the numbers range from -32768 to 32768.

6 0
3 years ago
he timing device in an automobile’s intermittent wiper system is based on an RC time constant and utilizes a 0.500-μF capacitor
Tatiana [17]

Answer:

4000k-ohm to 10,000k-ohm

Explanation:

As we know that time constant for an RC circuit is t=RC

Putting the values of t we can get the range of varaiable resistor as;

t=RC

Putting t=2 we get the first value of the range for the variable resistor

2=R*0.500*10^-6

R=2/(0.500*10^-6)

R=4*10^6

R=4000k-ohm

Now putting t=5 we get the final value for the range of variable resistor

t=RC

5=R*0.500*10^-6

R=5/(0.500*10^-6)

R=10*10^6

R=10,000k-ohm

So variable resistance must be made to vary in the range from 4000k-ohm to 10,000k-ohm

5 0
3 years ago
A computer with the ability to store instructions and do the job when requested by the operator, this type of computer had a spe
Sindrei [870]

Answer:

software's......................

8 0
3 years ago
Identify measures to protect your computer against threats from human actions. You cannot access a file in a computer that belon
scZoUnD [109]

Answer:

Firewalls

Explanation:

A firewall is simply a network security system whose main duty is. to prevent unwanted access to. private network.

Firewalls is measures to protect your computer against threats from human actions.

It is also the one singular thing that prevents you from accessing the file on your friends system.

5 0
3 years ago
While all pages use HTML code, not all pages are written in
creativ13 [48]
Is this a question?

*Answer: not much information to answer with*
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which change signaled a musical progression toward rock and roll?
    14·1 answer
  • Make a program that (i) asks the user for a temperature in Fahrenheit degrees and reads the number; (ii) computes the correspond
    8·1 answer
  • If you want to be more efficient at using the World Wide Web, refresh the page often.
    7·1 answer
  • A graph of an organization'snet income over the past 10 years is an example of an analogmodel.
    7·1 answer
  • 2. An evil twin attack that broadcasts a legitimate SSID for an unauthorized network is an example of what category of threat? A
    9·1 answer
  • _____________ helps to control and limit the number of consecutive request failures that cross a threshold. Review breaker Micro
    7·1 answer
  • How many times would the following loop iterate?
    15·1 answer
  • List the operating system you recommend, and write a sentence explaining why.
    8·1 answer
  • Functionality testing is primarily used with ____________. firewall protection software development hardening servers server tes
    8·1 answer
  • Design a program that asks the User to enter a series of 5 numbers. The program should store the numbers in a list then display
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!