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
An electronic spreadsheet is a type of<br> archive.<br> database.<br> document.<br> periodical.
zhenek [66]

Answer:

The answer is "database"

Explanation:

The spreadsheet is an application program, that is used to organized, analysis, and store data in tabular format. It is also used to import data and provide a database in programming that is used to store data and other option is not correct that can be described as follows:

  • Archive uses VBA that stands for "Visual Basic for Applications", it is used to store data in an archive file, that's why it is not correct.
  • Document is a file that is used to store data, that's why it is not correct.
  • Periodical use graph and bar charts to display data graphically, that's why it is not correct.

7 0
3 years ago
Read 2 more answers
A
tensa zangetsu [6.8K]
34 because its 34 ;)
8 0
3 years ago
Best way to build a model bridge
DanielleElmas [232]
Personally, i would use a 3-D printer, but you can use any material that you have, and have an example next to you for reference if you aren't going to 3-D print.

7 0
3 years ago
Read 2 more answers
What are the raw materials for the process of photosynthesis​
Ray Of Light [21]
The raw materials of photosynthesis, water and carbon dioxide, enter the cells of the leaf, and the products of photosynthesis, sugar and oxygen, leave the leaf.
7 0
3 years ago
Read 2 more answers
Consider two vectors that are NOT sorted, each containing n comparable items. How long would it take to display all items (in an
Darina [25.2K]

Answer:

The correct answer to the following question will be "Θ(​n​2​)

". The further explanation is given below.

Explanation:

If we're to show all the objects that exist from either the first as well as the second vector, though not all of them, so we'll have to cycle around the first vector, so we'll have to match all the objects with the second one.

So,

This one takes:

= O(n^2)

And then the same manner compared again first with the second one, this takes.

= O(n^2)

Therefore the total complexity,

= Θ(​n​2​)

7 0
3 years ago
Other questions:
  • A flowchart would be an example of what kind of programming?
    12·1 answer
  • You are in charge of designing a menu tree for navigating 1,250 books in a digital library. Present an argument of whether the m
    12·1 answer
  • To display measurements on the ruler while changing column widths, hold down the ________ key while dragging the marker.
    13·1 answer
  • Write a program in Python that reads in investment amount, annual interest rate, and number of years, and displays the future in
    6·1 answer
  • Write a function safeOpen() that takes one parameter, filename — a string giving the pathname of the file to be opened for readi
    15·1 answer
  • . public members are accessible from ________________ where the object is visible
    9·1 answer
  • Explain the strengths and weaknesses you have experienced with content information
    10·1 answer
  • Old systems can be useful when designing new computer software.<br> True or False
    7·2 answers
  • Stephen is looking through some design diagrams created for a specific application. He spots a diagram which uses a parallelogra
    14·1 answer
  • Who designed the apple i computer in 1976?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!