Page 51 - Code & Click - 7
P. 51
Experiential Learning
Lab Activity 8
Program to display the largest number among the three numbers accepted from the user.
1. Type the code as shown in the image in the Python Editor.
2. Press the F5 key to execute the code. Sample output of the program is given.
Experiential Learning
Lab Activity 9
Program to display the total marks, average marks, and grade awarded to a student. The name of
the student and marks in three subjects are accepted from the user. The grade is assigned as per
the following criteria:
• If average marks are greater than or equal to 90, grade is A
• If average marks are greater than or equal to 75 but less than 90, grade is B
• If average marks are greater than or equal to 40 but less than 75, grade is C
• If average marks are less than 40, grade is D
1. Type the code as shown in the image in the Python Editor.
2. Press the F5 key to execute the code. Sample outputs of the program are given below.
49