Page 136 - PortGPT_V2.1_C6_Flipbook
P. 136
https://www
D. Write a program to add two numbers which are entered by the user as the input.
E. Write a program to calculate the total marks obtained by the student and the percentage.
User will enter the marks obtained in five subjects that are English, Maths, Science, Social
https://www https://www
Science and Computer Science as input, on the basis of which total marks obtained by
the student and percentage is calculated.
Hint:
total_marks = s1 + s2 + s3 + s4 + s5
percentage = (total_marks / 500) * 100
https://www https://www
F. Write a program to convert the given time (in minutes), that is entered by the user as
the input, into hours and minutes.
Hint:
60 minutes = 1 hour
G. Write a program to convert the distance (in feet) into inches, yards, and miles.
Hint:
dis_inches = dis_ft * 12
dis_yards = dis_ft / 3.0
dis_miles = dis_ft / 5280.0
https://www https://www
134 Premium Edition-VI
https://www

