CSCI 131 – Python Language
CSCI 131 – Python Language
Functions Practice
Problem 1:
In file minimum.py write a function min (num). The function reads the sequence of num numbers and finds and returns the minimal value among the input numbers.
Write a main program that reads one input number that indicates the amount of numbers in the input sequence. The main program uses function min to find the minimal value among the input numbers.
Problem 2: (problem 1 from your text book from Programming Assignment 5)
In a file weather.py write a function FahToCel( Fah) that converts Fahrenheit to Celsius and returns the correspondent Celsius temperature. Write a main program that asks user for 7 days forecast and finds the average Celsius temperature for this 7 days.
Problem 3: (problem 3 from your text book from Programming Assignment 5)
In a file travel.py write a function speed(distance, time) that calculates and returns the average speed of the car if the car traveled “distance” miles and “time” hours.
Write a main program that asks user to enter pairs of positive numbers, the first zero indicates the end of the input. For each pair the program calculates the average speed using the function speed. Each pair will be considered as distance and travel time in hours.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- 131 iq percentile
- python 3 language reference
- python language specification
- python programming language pdf book
- python language reference manual pdf
- i 131 treatment for cats
- the python language reference pdf
- i 131 cats cost
- i 131 thyroid cancer treatment
- the python language reference manual
- python language manual
- af form 131 retirement