Python Lab Ex 6

seeders: 0
leechers: 0
Added on April 19, 2015 by 3sgknightin Other > Tutorials
Torrent verified.



Python Lab Ex 6 (Size: 4.68 KB)
 L6_E1.py879 bytes
 L6_E2.py1.66 KB
 L6_E3.py1.23 KB
 L6_E4.py952 bytes

Description

L6.2 Exercises
Exercise L6.E1 - Develop a program to compute and display the total and the average of 10 integer
inputs from the keyboard. You must use a list to store the 10 integers. An example:

Enter 10 integers: 5 78 96 54 34 12 3 7 88 5
Total = 382
Average = 38.2



Exercise L6.E2 - Develop a program to find and display the minimum and the maximum among 10
numbers entered from the keyboard. You must use a list to store the numbers entered. The
numbers can be non-integers. An example would be as follows:

Enter 10 integers: 5 7.8 9.6 54 3.4 1.2 3 7 8.8 5
Minimum = 1.2
Maximum = 54



Exercise L6.E3 - Suppose there are 4 students each having marks of 3 subjects. Develop a program to
read the marks from the keyboard and calculate and display the total marks of each student.
Use a 2D (two-dimensional) list to store the marks. An example would be as follows:

Enter the marks of four students, on four rows:
50 60 80
60 75 90
30 49 99
66 58 67
Total marks of four students:
190
225
178
191



Exercise L6.E4 - Develop a program to read names of two sports that you and your friends love to
play and watch. Then generate all sentences where the subject is in ["I", "We">, the verb is in
["play", "watch"> and the object is in the two sports. Use lists to store the words and generate
the sentences by iterating through the lists using deeply nested loops. An
example:

Enter two sports you love: cricket football
I play cricket. I watch cricket. I play football. I watch football.
We play cricket. We watch cricket. We play football. We watch
football.



Related Torrents

torrent name size seed leech

Sharing Widget


Download torrent
4.68 KB
seeders:0
leechers:0
Python Lab Ex 6