answer.
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
lara
1 month ago
9

Currently, this program will add 6 and 3 together, output the math problem and output the answer. Edit this code so that a rando

m 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.
import random

a = 6
b = 3

answer = a + b

print (str(a) + " + " + str(b) + " = " + str(answer))
Computers and Technology
1 answer:
8_murik_8 [892]1 month ago
6 0

I have attached my code in the image below. Good luck.

You might be interested in
The Online Shopping system facilitates the customer to view the products, inquire about the product details, and product availab
amid [812]
Refer to the explanation provided. In the online shopping software system, five actors can be identified: A Customer can perform actions such as exploring products and seeking product information. The interface allows for the creation of customer accounts facilitating purchases. Additionally, customers can browse items by using search categories or keywords, and they are able to order and make payments for their selected products. The payment system accepts two primary methods: credit card and PayPal. A Seller can list products in appropriate categories and create accounts to gain membership. An Administrator manages product listings and can modify existing categories or introduce new ones. Finally, the Site Manager has the capability to view different reports regarding customer orders, seller-added products, and user-created accounts.
3 0
14 days ago
You are a police officer trying to crack a case. You want to check whether an important file is in the evidence room. Files have
Harlamova29_29 [932]

Answer:

Since RANDY operates randomly, any file within the specified index range will have the recurrence relation as follows:

T(n) = T(n-i) + O(1)

Here, the probability is 1/n, where i can vary between 1 and n. The variable n in T(n) denotes the size of the index range, which will subsequently reduce to (n-i) in the following iteration.

Given that i is probabilistically distributed from 1 to n, the average case time complexity can then be expressed as:

T(n) = \sum_{i=1}^{n}\frac{1}{n}T(n-i) + O(1) = T(n/2)+O(1)

Next, solving T(n) = T(n/2) + O(1)

yields T(n) = O(log n).

Thus, the complexity of this algorithm is O(log n).

It should be noted that this represents the average time complexity due to the algorithm's randomized nature. In the worst-case scenario, the index range may only decrease by 1, resulting in a time complexity of O(n) since the worst-case scenario would be T(n) = T(n-1) + O(1).

3 0
1 month ago
Read 2 more answers
When long labels are required, which of these commands can you use to improve readability of a worksheet?
maria [879]
I think it's text wrapping! I hope this assists you.
6 0
8 days ago
Read 2 more answers
Which is among the earliest formats of audio used in video games? A. MP3 B. wave table synthesis C. pulse code modulation D. MOD
Harlamova29_29 [932]

Answer:

MOD

Explanation:

The MOD audio file format is primarily designed to represent musical content. It employs the.MOD file extension and is notably recognized as background music in various independent video games. It can be said that MOD audio file types are among the most widely used trackers in numerous computer games and demos.

0 0
1 month ago
Read 2 more answers
Widget Corp. wants to shift its list of inventory to a cloud so that its different branches can access it easily. The company ne
oksian1 [804]
The most suitable cloud option for Widget Corp, which requires a solution that is both cost-effective and does not risk exposing critical applications and data externally, is a hybrid cloud.
5 0
20 days ago
Other questions:
  • An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When
    6·1 answer
  • What are the differences between a policy, a standard, and a practice? What are the three types of security policies? Where woul
    15·1 answer
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • This question involves a simulation of a two-player game. In the game, two simulated players each start out with an equal number
    7·1 answer
  • More Loops: All versions of foods.py in this section have avoided using for loops when printing to save space. Choose a version
    13·1 answer
  • The principal that users have access to only network resources when an administrator explicitly grants them is called __________
    6·1 answer
  • Write a program that prompts the user to enter three cities and displays them in ascending order. Here is a sample run: Enter th
    8·1 answer
  • A wireless network does not benefit like a wired network does, when it comes to collision reduction. Which device reduces collis
    6·1 answer
  • Write a program in pascal to find the area of a circle
    14·1 answer
  • Explain what might happen if two stations are accidentally assigned the same hardware address?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!