Write a program in python that asks the user to input a the


Python

1. Write a program in Python that prompts the user for two integers and then prints:

a) The sum

b) The difference

c) The product

d) The average

e) The distance (absolute value of the difference)

f) The maximum (the larger of the two)

g) The minimum (the smaller of the two)

Hint: Python defines max and min functions that accept a sequence of values, each separated with comma.

2. Write a program in Python that asks the user to input:

a) The number of gallons of gas in the tank

b) The fuel efficiency in miles per gallon

c) The price of gas per gallon

Then print:

a) The cost per 100 miles

b) How far the car can go with the gas in the tank

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Write a program in python that asks the user to input a the
Reference No:- TGS02905426

Expected delivery within 24 Hours