Horje
3.Write a program that has a class student that stores roll number, name, and marks (in three subjects) of the students. Display the information (roll number, name, and total marks) stored ab
3.Write a program that has a class student that stores roll number, name, and marks (in three subjects) of the students. Display the information (roll number, name, and total marks) stored about the student?
class Student():
	def __init__(self):
		self.name=input()
 		self.roll_no=input()
 		self.marks=[int(i) for i in input('enter the marks obtained in three subj
 	def Display(self):
 		print('Name:',self.name)
 		print('Roll no:',self.roll_no)
 		print('Total marks:',sum(self.marks))
a1=Student()
a1.Display()




C

Related
ecto where is not nil Code Example ecto where is not nil Code Example
increment pointer value in c Code Example increment pointer value in c Code Example
c type conversion Code Example c type conversion Code Example
find factors of a number in c Code Example find factors of a number in c Code Example
curl ftp upload file to directory Code Example curl ftp upload file to directory Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9