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
Stels [109]
3 years ago
15

Please help explain this calculator code.

Computers and Technology
1 answer:
Tom [10]3 years ago
7 0

Answer:

that looks really complicated. Try going to khan academy to get an explanation, they almost always have great explanations for things.

Explanation:

You might be interested in
Write the use of these computers.
xxTIMURxx [149]

Answer:

i not know mainframe computer there is many use of computer

5 0
2 years ago
Extend to also calculate and output the number of 1 gallon cans needed to paint the wal. Hint: Use a math function to round up t
Crank

Answer:

Here is the Python program:

import math #import math to use mathematical functions

height = float(input("Enter wall height (feet): ")) #prompts user to enter wall height and store it in float type variable height

width = float(input("Enter wall width (feet): ")) #prompts user to enter wall width and store it in float type variable width

area = height *width #computes wall area

print('Wall area: {} square feet'.format(round(area))) #displays wall area using round method that returns a floating-point number rounded

sqftPerGallon = 350 #sets sqftPerGallon to 350

paintNeeded = area/ sqftPerGallon #computes needed paint

print("Paint needed: {:.2f} gallons".format(paintNeeded)) #displays computed paint needed up to 2 decimal places

cansNeeded = int(math.ceil(paintNeeded)) #computes needed cans rounding the paintNeeded up to nearest integer using math.ceil

print("Cans needed: {} can(s)".format(cansNeeded)) #displays computed cans needed

colorCostDict = {'red': 35, 'blue': 25, 'green': 23} #creates a dictionary of colors with colors as key and cost as values

color = input("Choose a color to paint the wall: ") #prompts user to enter a color

if color in colorCostDict: #if the chosen color is present in the dictionary

    colorCost = colorCostDict.get(color) #then get the color cost from dictionary and stores it into colorCost using get method that returns the value(cost) of the item with the specified key(color)

    cost = cansNeeded * colorCost #computes the cost of purchasing paint of specified color per cansNeeded

  print("Cost of purchasing {} paint: ${}".format(color,colorCostDict[color])) #displays the real cost of the chosen color paint

print("Cost of purchasing {} paint per {} gallon can(s): ${}".format(color,cansNeeded, cost)) #displays the cost of chosen color paint per cans needed.

Explanation:

The program first prompts the user to enter height and width. Lets say user enter 20 as height and 50 as width so the program becomes:

Wall area computed as:

area = height *width

area = 20 * 50

area = 1000

Hence the output of this part is:

Wall area: 1000 square feet                                                                                                                     Next program computes paint needed as:

paintNeeded = area/ sqftPerGallon

Since sqftPerGallon = 350 and area= 1000

paintNeeded = 1000 / 350

paintNeeded = 2.86

Hence the output of this part is:

Paint needed: 2.86 gallons

Next program computes cans needed as:      

cansNeeded = int(math.ceil(paintNeeded))

This rounds the computed value of paintNeeded i.e. 2.86 up to nearest integer using math.ceil so,

cansNeeded = 3                                                                  

Hence the output of this part is:

Cans needed: 3 can(s)                                                                                                                            Next program prompts user to choose a color to paint the wall

Lets say user chooses 'blue'

So the program get the cost corresponding to blue color and multiplies this cost to cans needed to compute the cost of purchasing blue paint per gallon cans. So

cost = cansNeeded * colorCost

cost = 3 * 25

cost = 75

So the output of this part is:

Cost of purchasing blue paint per 3 gallon can(s): $75                                                                                        The screenshot of the program along with its output is attached.

5 0
3 years ago
PLEASEEEEE HELLPPP IT'S URGENT!!! PLEASEEEEE HELLPPP IT'S URGENT!!!
kogti [31]

Answer:

LED matrix is a grid of lights arranged into rows and columns

A battery is a device consisting of one or more electrochemical cells with external connections for powering electrical devices such as flashlights, mobile phones, and electric cars.

A processor is a machine that processes something.

An accelerometer is a tool that measures proper acceleration.

Universal Serial Bus is an industry standard that establishes specifications for cables and connectors and protocols for connection, communication and power

A compas is an instrument containing a magnetized pointer which shows the direction of magnetic north and bearings from it.

A block editor allows you to add Columns block, which basically adds two columns of paragraph blocks.

Iteration is the repetition of a process in order to generate an outcome.

Selection is the action or fact of carefully choosing someone or something as being the best or most suitable.

Algorithm is a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

debug identifies and remove errors from (computer hardware or software).

an arithmetical value, expressed by a word, symbol, or figure, representing a particular quantity and used in counting and making calculations and for showing order in a series or for identification.

I can do the rest if you want, just wanted to give you a head start :)

8 0
3 years ago
Is there apps/ websites like brainly?
Virty [35]

Answer:

Mathpix Snip, Socratic, Microsoft Math Solver....etc.

Explanation:

Hope this helps! :)

6 0
2 years ago
Read 2 more answers
Complete the statement about WYSIWYG editors when you use a WYSIWYG editor you typically specify the continent and blank A.layou
erastovalidia [21]

Answer:

When you use a WYSIWYG editor you typically specify the content and layout while the editor generates the HTML code

Explanation:

Required

Complete the blanks

In WYSIWYG, the user of the application provides contents to the WYSIWYG software and also designs the appearance; The appearance is referred to as the layout.

Throughout the design, the user will not use HTML codes; it is the duty of the WYSIWYG editor to generate HTML code based on the input designs by the user.

6 0
3 years ago
Other questions:
  • Why is it important to know much time you spend on task
    8·1 answer
  • You are looking for a backup that copies only the files that have changes since the last full backup. Which of the following wil
    13·1 answer
  • Join zoom meet <br>id=547 458 9345<br>pw=sencHURI​
    8·2 answers
  • Hey im b---o---r---e---d dont report cuz if u do ur l a m e :)
    14·1 answer
  • What is the significance of the Abstract section of a research paper? A. It contains important information such as the author, c
    5·1 answer
  • Which statement describing the arcade games played in the 1970s is true?
    14·1 answer
  • Pleaseeeeeeee tellllllllllllllllllllll​
    8·1 answer
  • . Define the process of Technological relationship
    12·1 answer
  • . Write a function sumLastPart which, only using list library functions (no list comprehension), returns the sum of the last n n
    6·1 answer
  • A ____________ protocol is software that provides or facilitates a connection in which no information is retained by either send
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!