0% found this document useful (0 votes)
9 views1 page

1a Py

The document outlines a Python program that collects student details including name, USN, and marks in three subjects. It calculates the total marks and percentage, displaying the results along with appropriate classifications based on the percentage. The classifications include 'First class Exemplary', 'First class with distinction', 'First class', 'Second class', and 'Fail' based on the percentage ranges.

Uploaded by

Bhagyashree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

1a Py

The document outlines a Python program that collects student details including name, USN, and marks in three subjects. It calculates the total marks and percentage, displaying the results along with appropriate classifications based on the percentage. The classifications include 'First class Exemplary', 'First class with distinction', 'First class', 'Second class', and 'Fail' based on the percentage ranges.

Uploaded by

Bhagyashree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1a. Develop a program to read the student details like name, USN and marks in 3 subjects.

Display
the student details, total marks and percentage with suitable messages.

sname=input("Enter the student name:")

usn=input("Enter the student usn:")

marks1=int(input("Enter the marks in first subject: "))

marks2=int(input("Enter the marks in second subject:"))

marks3=int(input("Enter the marks in second subject: "))

total=marks1+marks2+marks3

percentage=round((total/300)*100)

print('\n Name of the student:',sname)

print('\n USN of the student:',usn)

print('\n Marks in first subject:',marks1)

print('\n Marks in second subject:',marks2)

print('\n Marks in third subject:',marks3)

print('\n total marks:', total)

print('\n Percentage:',percentage)

if percentage >= 90:

print('First class Exemplary')

elif percentage >= 75 and percentage < 90:

print('First class with distinction')

elif percentage >=60 and percentage < 75:

print('First class')

elif percentage >=35 and percentage <60:

print('Second class')

else:

print('Fail')

You might also like