Question

1 Normal 1 No Spac... Heading 1 Heading 2 Title Subtitle Subtle Em...Emphasis Int Styles 1) Create a PYHW3 document that will
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Pseudocode:

A.

milesPerGallon(miles,gallons)

{

milesPerGallon=miles/gallons

return milesPerGallon

}

B.

main()

{

miles=input()

gallons=input()

mPG=miles/gallon

print mPG

}

Flowchart:

Start Input miles and gallons mPG-miles/gallon Display mPG Er

Code in Python:(refer to screenshot below for indentations)

def milesPerGallon(miles,gallons): #Part A
milesPerGallon=miles/gallons #calculating miles per gallon
return milesPerGallon #returning the result
def main(): #Part B
miles=float(input("Enter the number of miles : ")) #taking miles as input
gallons=int(input("Enter the number of gallon : ")) #taking gallons as input
mPG=milesPerGallon(miles,gallons) #using function defined above to calculate miles per gallon
print("Miles per Gallon : ",mPG) #output
if __name__=="__main__":
main()

ISEN.pyN | Heyto.py®困 1 def milesPer-Gallon(miles, gallons): #PartA milesPerGallon-miles/gallons #calculating miles per gallo

Output:

In [3]: In [3]: unfileC:/Users/Debjit G/HeyYo.py, wdir-C:/Users/ Debjit G Enter the number of miles 2.5 Enter the number o

Add a comment
Know the answer?
Add Answer to:
1 Normal 1 No Spac... Heading 1 Heading 2 Title Subtitle Subtle Em...Emphasis Int Styles 1)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • O110 Spac.... Heading 1 Heading 2 Title Subtitle Subtle Em... Emphasis l aph Styles At its...

    O110 Spac.... Heading 1 Heading 2 Title Subtitle Subtle Em... Emphasis l aph Styles At its peak, a tornado is 51.0 m in diameter and carries 435-km/h winds. What is its angular velocity in revolutions per second? rev/s

  • Normal 1 No Spac.. Heading 1 Heading 2Ttle Subtitle Subtle Em.. Emphasis in Styles A student...

    Normal 1 No Spac.. Heading 1 Heading 2Ttle Subtitle Subtle Em.. Emphasis in Styles A student bikes to school by traveling first dN 0.800 miles north, then dw: 0.600 miles west, and finally ds-0.100 miles south. (dS)x(dS)x (dS)y- 0,-0.100 The displacement vector for the student d' b can be written as d' Ntd Wad'S (see (Figure 1)). In the space provided, type d' b in component form (db)x.(dbly 0.600,0.700 Question: A)If a bird were to start out from the origin...

  • 1 Normal 1 No Spac. Heading 1 Heading 2 Title Subtitle Subtle Em Emphasis in Paragraph...

    1 Normal 1 No Spac. Heading 1 Heading 2 Title Subtitle Subtle Em Emphasis in Paragraph Styles If a fixed asset, such as a computer, were purchased on January 1 for $3,750 with an estimated life of 3 years and a salvage or residual value of $150, the journal entry for monthly expense under straight- line depreciation is Depreciation Expense1,200 Accumulated Depreciation 1,200 Depreciation Expense 100 Accumulated Depreciation 100 Accumulated Depreciation1,200 Depreciation Expense1,200 Accumulated Depreciation 100 Depreciation Expense 100 (Cr)-...

  • No Spac... Heading 1 Heading 2 Title Subtitle Subtle Em Paragraph Emo Styles Explain epidemiology and...

    No Spac... Heading 1 Heading 2 Title Subtitle Subtle Em Paragraph Emo Styles Explain epidemiology and social epidemiology. Why are they important to understanding the way health affects different populations? Pick a disease and Pick a population (i.e. school-age children, women of child bearing age, male police officers, etc).and explain.

  • TNormal No Spac... Heading1 Heading 2 Title S Subtitle Subtle Em... . Emphasis Font Paragraph Styles...

    TNormal No Spac... Heading1 Heading 2 Title S Subtitle Subtle Em... . Emphasis Font Paragraph Styles 3. 1) Use the items below to prepare a personal balance sheet for lim Gordon (use the worksheet Topic3 BalanceSheet posted on D21]. Hint: not all information is relevant Auto repair paid for last month: $650 Monthly take-home salary: $3,950 Cash in checking account: $450 Savings account balance: $690 Utility bills outstanding (includes telephone, gas, electricity): S100 Balance of educational loan: $5,200 Balance of...

  • 1 Normal 1 No Spac... Heading 1 Heading 2 Title Subtitle Subtle Em... EmphasisIn Paragrap Styles...

    1 Normal 1 No Spac... Heading 1 Heading 2 Title Subtitle Subtle Em... EmphasisIn Paragrap Styles 1. What is the third intermediate in the following overall synthesis? 0 он a. b. d. e. CHyI 2. Which intermediate reacts with CHJl in the following synthesis?79 b. C. d. e. not a.-cd 3. What would be the best reaction sequence to make the following ketone? a. cyclohexanone + LDA + CHal + LDA + (CHa)SiCI + (CHs).cal/zncl b. LDA + cyclohexa none...

  • nomal No Spac... Heading 1 Paragraph JULLL HDBl AaBbCcDAoBbced Heading 2 Title Subtitle Subtle Em Styles...

    nomal No Spac... Heading 1 Paragraph JULLL HDBl AaBbCcDAoBbced Heading 2 Title Subtitle Subtle Em Styles 1-What RFLP stand for and what RFLP analysis test for? 2-Why do you add sample loading buffer to DNA sample prior to loading sample into agarose gel. 3 In cheek DNA extraction procedure, name two steps that helped to break (lysis) the cheek cells. 4. Would a shorter DNA fragment move faster or slower through agarose gel, why.

  • INormal Heading 1 Heading 2 Title Subtle Em Emphasis Subtitle Inten Font Paragraph Styles List and...

    INormal Heading 1 Heading 2 Title Subtle Em Emphasis Subtitle Inten Font Paragraph Styles List and Briefly Describe TEN (10) health promotion initiatives that you know. Start with initiatives that are NYC-based (in your neighborhood, places you frequent, in subways, at your work place, on buses, etc.). You can then search initiatives in other cities. The initiatives should be designed to promote individual or community health. use at least 2 per review articles.

  • solve on paper neatly Emphasis Heading 1 1 Normal Strong Subtitle Title T No Spac... Subtle...

    solve on paper neatly Emphasis Heading 1 1 Normal Strong Subtitle Title T No Spac... Subtle Em... Intense E... Paragraph Styles R2 40 KR 340 kg R R R R M w 200 K2 50 ΚΩ R3 50 K2 Your(s) Vin 4 Yout 1 Fig. 2.1. Fig. 2.2 (A) Recommend a generalized Op Amp amplifier which processes sin wave into a cosine wave. a square wave into a triangular wave, a constant DC signal into a zero-output signal and a...

  • Normal 1 No Spac... Heading 1 Heading 2 Title Subtitle Subtle Em... Emphasis intense - XX...

    Normal 1 No Spac... Heading 1 Heading 2 Title Subtitle Subtle Em... Emphasis intense - XX A..A. EEEE. - - Hi-Tek Manufacturing, Inc. makes two types of industrial component parts-the 3300 and the 1500. An absorption costing income statement for the most recent period is shown HI-Tek Manufacturing Inc. Income Statement Cost of goods sold Gross margin Selling and administrative expenses et operating loss 1,264,161 Hi-Tek produced and sold 60 200 units of B300 at a price of $20 per...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT