Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

complete these questions below, then submit Python source code files (-py files) and input/output screenshots. Name the screenshots with the number of the question. For

complete these questions below, then submit Python source code files (-py files) and input/output screenshots. Name the screenshots with the number of the question. For example, screenshot_1.jpg for the first question, and screenshot_2.jpg for the second question, etc.

1. Land Calculation:

We need a Python program named "land calculation.py" that asks the user to enter the total square feet in a tract of land and calculates the number of acres in the tract. Note that one acre of land is equivalent to 43,560 square feet. Hint: Divide the amount entered by 43,650 to get the nunmber of acres.

2. Distance Traveled: Assuming there are no accidents or delays, the distance that a car travels down the interstate can be calculated with the following formula: Distance = Speed x Time A car is traveling at 70 miles per hour. We need a Python program named "distance_traveled.py" that displays the following: The distance the car will travel in 6 hours The distance the car will travel in 10 hours The distance the car will travel in 15 hours

3. Miles-per Gallon: A car's miles-per-gallon (MPG) can be calculated with the following formula: MPG = Miles driven / Gallons of gas used We need a Python program named "miles per gallon.py" that asks the user for the number of miles driven and the gallons of gas used. It should calculate the car's MPG and display the result.

4. Male and Female Percentages: We need a Python program named "male female percentages" that asks the user for the number of males and the number of females registered in a class. The program should display the percentage of males and females in the class. Hint: Suppose there are & males and 12 females in a class. There are 20 students in the class. The percentage of males can be calculated as 8/20 = 0.4, or 40%. The percentage offemales can be calculated as 12/20 = 0.6, or 60%.


5. Stock Transaction: Last month Joe purchased some stock in Acme Software, Inc. Here are the details of the purchase: The number of shares that Joe purchased was 2,000. When Joe purchased the stock, he paid $40.00 per share. Joe paid his stockbroker a commission that amounted to 3 percent of the amount he paid for the stock. Two weeks later Joe sold the stock. Here are the details of the sale: The number of shares that Joe sold was 2,000. He sold the stock for $42.75 per share. He paid his stockbroker another commission that amounted to 3 percent of the amount he received for the stock.

We need a Python program named "stock_transaction.py" that displays the following information: -The amount of money Joe paid for the stock. -The amount of commission Joe paid his broker when he bought the stock. -The amount that Joe sold the stock for. -The amount of commission Joe paid his broker when he sold the stock. -Display the amount of money that Joe had left when he sold the stock and paid his broker (both times). If this amount is positive, then Joe made a profit. If the amount is negative, then Joe lost money. 2/3


Step by Step Solution

There are 3 Steps involved in it

Step: 1

Here are the Python programs for the given tasks Land Calculation landcalculationpy landcalculationpy ask user for input totalsquarefeet floatinputEnt... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

Find k such that f(x) = x 3 - kx 2 + kx + 2 has the factor x 2.

Answered: 1 week ago

Question

1. Critically discuss treatment approaches for violent offenders.

Answered: 1 week ago