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
den301095 [7]
2 years ago
5

Budget Analysis (use while loop) Write a program that asks the user to enter the amount that he or she has budgeted for a month.

A loop should then prompt the user to enter each of his or her expenses for the month and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget.
Computers and Technology
1 answer:
Agata [3.3K]2 years ago
6 0

Answer:

print('This program will help you determine whether you\'ve budgeted enough ' +

     'for your expenses. You\'ll just need to enter your budget and the ' +

     'cost of each of your expenses for the month and we will calculate ' +

     'the balance.')

budget = float(input('How much have you budgeted this month? '))

expenses = 0

check = 0

while check >= 0:

   check = float(input('Enter an expense amount or -1 to quit: '))

   if check != -1:

       expenses += check

balance = budget - expenses

if balance < 0:

   print('\nYou haven\'t budgeted enough. You\'re going to be $', \

         format(-1 * balance, ',.2f'), ' short this month.', sep = '')

elif balance == 0:

   print('\nBe careful. You\'ve budgeted just enough to make it through ' +

         'the month.')

else:

   print('\nYou will have $', format(balance, ',.2f'), ' extra this month.', \

         sep = '')

You might be interested in
3.A customer has a system with a Gigabyte B450 Aorus Pro motherboard. He wants to upgrade the processor from the AMD Athlon X4 9
Burka [1]

Answer:

The upgrade is possible and it will yield a remarkable  increase in performance

Explanation:

It is a newer product, there is tendency of having a better application compatibility/performance

It has much higher multi threaded performance which is around 522% higher. This allows for higher performance in professional applications like encoding and heavy multitasking compared to the previous.

When considering gaming, it has higher performance compared to the previous.

5 0
2 years ago
ACCOUNTING
ivann1987 [24]

last question is D

Hope this helps

7 0
2 years ago
Read 2 more answers
Mary has been locked out of her account after failing to correctly enter her password three times. As the system administrator,
Digiron [165]
Oh hey lol yea yea lol I got the money back to me put on the phone so you know
7 0
2 years ago
A 1.17 g sample of an alkane hydrocarbon gas occupies a volume of 674 mL at 28°C and 741 mmHg. Alkanes are known to have the gen
Nina [5.8K]

Answer:

C3H8

Explanation:

Step 1:

Data obtained from the question. This includes the following:

Mass of alkane = 1.17g

Volume (V) = 674 mL

Temperature (T) = 28°C

Pressure (P) = 741 mmHg.

Gas constant (R) = 0.08206 atm.L/Kmol

Step 2:

Conversion to appropriate unit.

For Volume:

1000mL = 1L

Therefore, 674mL = 674/1000 = 0.674L

For Temperature:

Temperature (Kelvin) = Temperature (celsius) + 273

Temperature (celsius) = 28°C

Temperature (Kelvin) = 28°C + 273 = 301K

For Pressure:

760mmHg = 1atm

Therefore, 741 mmHg = 741/760 = 0.975atm

Step 3:

Determination of the number of mole of the alkane..

The number of mole of the alkane can be obtained by using the ideal gas equation. This is illustrated below:

Volume (V) = 0.674L

Temperature (T) = 301K

Pressure (P) = 0.975atm

Gas constant (R) = 0.08206 atm.L/Kmol

Number of mole (n) =?

PV = nRT

n = PV /RT

n = (0.975 x 0.674)/(0.08206x301)

n = 0.0266 mole

Step 4:

Determination of the molar mass of the alkane.

Mass of alkane = 1.17g

Number of mole of the alkane = 0.0266mole

Molar Mass of the alkane =?

Number of mole = Mass/Molar Mass

Molar Mass = Mass/number of mole

Molar Mass of the alkane = 1.17/0.0266 = 44g/mol

Step 5:

Determination of the molecular formula of the alkane.

This is illustrated below:

The general formula for the alkane is CnH2n+2

To obtain the molecular formula for the alkane we shall assume n = 1, 2, 3 or more till we arrive at molar Mass of 44.

When n = 1

CnH2n+2 = CH4 = 12 + (4x1) = 16g/mol

When n = 2

CnH2n+2 = C2H6 = (12x2) + (6x1) = 30g/mol

When n = 3

CnH2n+2 = C3H8 = (12x3) + (8x1) = 44g/mol

We can see that when n is 3, the molar mass is 44g/mol.

Therefore, the molecular formula for the alkane is C3H8.

7 0
2 years ago
Widget Corp. wants to shift its list of inventory to a cloud so that its different branches can access it easily. The company ne
____ [38]

Answer:

The best cloud option for Widget Corp considering the cloud computing option should be cost-effective and should not expose mission-critical applications and data to the outside world.

Is a hybrid could.

Explanation:

The reasons behind this answer are that in the first place the cloud is not going to be fully managed by a third party, but also by the IT department of Widget Corp allowing it to control its security. Also, that the cloud can be adapted to public or mainstream sources, resources, and platforms. Making it very user friendly and lowering down specific knowledge to use it.

5 0
2 years ago
Other questions:
  • ​identify a text-level element used to mark generic run of text within the document.
    15·1 answer
  • When a machine on the public network wants to reach the server at 172.30.0.10, which ip will it use?
    6·2 answers
  • Enter a formula in cell B10 to return a value of 35000 if the Net Profit After Tax (cell B9) is greater than or equal to 470000
    15·2 answers
  • Data Analysis The Iris Plants Database contains 3 classes of 50 instances each, where each class refers to a type of Iris plant.
    15·1 answer
  • When you use a while loop to compute the product of several values, you should initialize the variables holding the product to _
    15·1 answer
  • Suppose that, even unrealistically, we are to search a list of 700 million items using Binary Search, Recursive (Algorithm 2.1).
    11·1 answer
  • The function below takes two integer parameters: low and high. Complete the function so that it prints the numbers from low to h
    14·1 answer
  • In C++ the declaration of floating point variables starts with the type name double, followed by the name of the variable, and t
    10·1 answer
  • reAay ouyay aay hizway ithway igPay atin?Lay? (Translated: "Are you a whiz with Pig Latin?") Write a program that converts an En
    6·1 answer
  • Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!