Datatype and Arithmetic Operator Practice Question ( DS140823 ) - 24-08-2023

Write a python program that takes in a student name, class, and section as input from user. It should also take in five subject marks of the students and find the total mark and percentage. Display a result in such a way that their name, class, section, subject marks, total and percentage are printed.

2 Likes

student_name=input("enter the studnet name:")
student_class=int(input("enter the studnet name:"))
student_section=input("enter the studnet name:")
subject_1=int(input("enter the subject_1 marks:"))
subject_2=int(input("enter the subject_2 marks:"))
subject_3=int(input("enter the subject_3marks:"))
subject_4=int(input("enter the subject_4 marks:"))
subject_5=int(input("enter the subject_5 marks:"))
total_marks=subject_1+subject_2+subject_3+subject_4+subject_5
percentage=total_marks/5
print(student_name,student_class,student_section)
print(subject_1,subject_2,subject_3,subject_4,subject_5)
print("total marks of the students=",total_marks)
print("total percentage of the students=",percentage)

@bharatiyadav14 correct me mam if any mistakes is there

1 Like


name=input("enter name of student")

Class=input("enter class of student")

section=input("enter section of student")

mark1=int(input("enter subject 1 marks "))

mark2=int(input("enter subject 2 marks "))

mark3=int(input("enter subject 3 marks "))

mark4=int(input("enter subject 4 marks "))

mark5=int(input("enter subject 5 marks "))

total=mark1+mark2+mark3+mark4+mark5

percentage=(total/500)*100

print(f"name of student = {name}\n Class of student= {Class}\n section of student= {section}\n marks of subject 1={mark1}\n marks of subject 2={mark2}\n marks of subject 3={mark3}\n marks of subject 4={mark4}\n marks of subject 5={mark5}\n total={total}\n percentage={percentage}")

1 Like
name_of_student = input("enter the name of student")

class_of_student = int(input("enter the class"))

class_section = input("enter the section")

subject_1_marks = int(input("enter the marks_1_"))

subject_2_marks = int(input("enter the marks_2_"))

subject_3_marks = int(input("enter the marks_3_"))

subject_4_marks = int(input("enter the marks_4_"))

subject_5_marks = int(input("enter the marks_5_"))

total_marks = subject_1_marks + subject_2_marks + subject_3_marks + subject_4_marks + subject_5_marks

percentage_of_marks_1 = subject_1_marks / 100 * 100

percentage_of_marks_2 = subject_2_marks / 100 * 100

percentage_of_marks_3 = subject_3_marks / 100 * 100

percentage_of_marks_4 = subject_4_marks / 100 * 100

percentage_of_marks_5 = subject_5_marks / 100 * 100

print(name_of_student)

print(class_of_student)

print(class_section)

print(subject_1_marks)

print(subject_2_marks)

print(subject_3_marks)

print(subject_4_marks)

print(subject_5_marks)

print(total_marks)

print(percentage_of_marks_1)

print(percentage_of_marks_2)

print(percentage_of_marks_3)

print(percentage_of_marks_4)

print(percentage_of_marks_5)
a = input('Enter the Name ')

b = int(input('Enter class '))

z = input('Enter section')

English = int(input('Enter your English marks'))

Maths = int(input('Enter your Maths marks'))

Science = int(input('Enter your Science marks'))

GK = int(input('Enter your GK marks'))

Computer = int(input('Enter your Computer marks'))

Average = ((English+ Maths+ Science+ GK+ Computer)/500)

print(Average)

Percentage = Average * 100

print(f'Congratulations {a}')

print(f'You have secured {Percentage}%')
student_name= input("student Name : ")
student_class= input("student Class : ")
student_section= input("Student Section : ")
marks_math= float(input("Marks in math : "))
marks_geo= float(input("Marks in Geography : "))
marks_hist= float(input("Marks in History : "))
marks_phy= float(input("Marks in Physics : "))
marks_chem= float(input("Marks in Chemistry : "))
marks_sum= marks_math + marks_geo + marks_hist + marks_phy + marks_chem
marks_percentage= (marks_sum/500)*100
print("Sum of marks : ", marks_sum)
print("Percentage of marks : ", marks_percentage)


print(f"Student {student_name} of class {student_class} and section {student_section} got \n {int(marks_math)} in math \n {int(marks_geo)} in Geography \n {int(marks_hist)} in History \n {int(marks_phy)} in Physics \n {int(marks_chem)} in Chemistry")
print(f"Sum of marks for {student_name} is {marks_sum} and Percentage of marks is {marks_percentage}")


@bharatiyadav14 Let me know if any modification is required.
Thank you.

1 Like
name = input("Enter the name: ")
Class = int(input("Enter the class: ")
            )
section = input("Enter the section: ")

Eng = int(input("Enter the Eng marks: "))
Kan = int(input("Enter the Kan marks: "))
Hin = int(input("Enter the Hin marks: "))
Mat = int(input("Enter the Mat marks: "))
Sci = int(input("Enter the Sci marks: "))

total = Eng + Kan + Hin + Mat + Sci
percentage = total / 5

print("Name:", name)
print("Class:", Class)
print("Section:", section)

print("Subject Marks:", Eng, Kan, Hin, Mat, Sci)
print("Total Marks:", total)
print("Percentage:", percentage)
1 Like
1 name_student=(input(name_student :))
2 class_student=(input(class_student :))
3 section=input(section)
4
5 print(#SUBJECTES)
6
7 tamil = int(input(Tamil : ))
8 english = int(input(english : ))
9 maths = int(input(maths : ))
10 science = int(input(science : ))
11 social_seience=int(input(social_seience : ))
12 Total=(tamil+english+maths+science+social_seience)
13 print(Total : ,Total)
14 print(persentage : ,Total/5)

Print output :boom:

name_student :M SURYA
class_student :10th
section"B"
#SUBJECTES
Tamil : 80
english : 55
maths : 69
science : 85
social_seience : 85
Total : 374
persentage : 74.8

student_name = input('enter the student name : ')
student_class = input('enter the student class : ')
student_section = input('enter the student section : ')
subject_1=int(input(“enter the subject_1 marks:”))
subject_2=int(input(“enter the subject_2 marks:”))
subject_3=int(input(“enter the subject_3marks:”))
subject_4=int(input(“enter the subject_4 marks:”))
subject_5=int(input(“enter the subject_5 marks:”))
total_marks=subject_1+subject_2+subject_3+subject_4+subject_5
percentage=total_marks/5
print(student_name,student_class,student_section)
print(subject_1,subject_2,subject_3,subject_4,subject_5)
print(“total marks of the students=”,total_marks)
print(“total percentage of the students=”,percentage)

1 Like
student_name= input("Student Name : ")

student_class= input("Student Class : ")

student_section= input("Student Section : ")

sub_1= float(input("Marks in Sanskrit : "))

sub_2= float(input("Marks in Hindi : "))

sub_3= float(input("Marks in Biology : "))

sub_4= float(input("Marks in Zoology : "))

sub_5= float(input("Marks in botony : "))

marks_sum= sub_1 + sub_2 + sub_3 + sub_4 + sub_5

marks_percentage= (marks_sum/1000)*100

print("Sum of marks : ", marks_sum)

print("Percentage of marks : ", marks_percentage)
1 Like
Name = str(input("Enter the student name: "))

student_class = input("Enter the student class: ")

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

maths =int(input("Enter the maths mark out of 100: "))

biology =int(input("Enter the biology mark of 100: "))

chemistry =int(input("Enter the chemistry mark of 100: "))

physis =int(input("Enter the physis mark of 100: "))

english =int(input("Enter the English mark out of 100: "))

total_mark = maths+biology+chemistry+physis+english

Percentage = (total_mark/500) *100

print("total marks",total_mark)

print("Percentage of marks",Percentage)
1 Like

name = input("Enter student’s name: ")

class_name = input("Enter class: ")

section = input("Enter section: ")

tamil=int(input(“enter the tamil mark:”))

english=int(input(“enter the english mark:”))

maths=int(input(“enter the maths mark:”))

biology=int(input(“enter the biology mark:”))

physics=int(input(“enter the physics mark:”))

total_mark=tamil+english+maths+biology+physics

percentage = (total_mark/ 500) * 100

print(“\nStudent Result:”)

print(“Name:”, name)

print(“Class:”, class_name)

print(“Section:”, section)

print(tamil,“\n”,english,“\n”,maths,“\n”,biology,“\n”,physics,“\n” )

print(“Total Marks:”, total_mark)

print(“Percentage:”, percentage, “%”)

1 Like
student_name = input("Enter name")
Student_class = input ("Enter Class")
Student_section= input("Enter section")

Subject_1_marks=int(input("enter the marks_1"))
Subject_2_marks=int(input("enter the marks_2"))
Subject_3_marks=int(input("enter the marks_3"))
Subject_4_marks=int(input("enter the marks_4"))
Subject_5_marks=int(input("enter the marks_5"))

Total_marks = Subject_1_marks + Subject_2_marks + Subject_3_marks + Subject_4_marks + Subject_5_marks=int

percentage = (total_marks/500)*100

student_name = input("Enter the student name:")
student_class = input("Enter the student class:")
student_section = input("Enter the student section:")
subject_1=int(input("Enter the subject_1 marks:"))
subject_2=int(input("Enter the subject_2 marks:"))
subject_3=int(input("Enter the subject_3marks:"))
subject_4=int(input("Enter the subject_4 marks:"))
subject_5=int(input("Enter the subject_5 marks:"))
total_marks = (subject_1+subject_2+subject_3+subject_4+subject_5)
percentage = (total_marks//5)
print(student_name,student_class,student_section)
print(subject_1,subject_2,subject_3,subject_4,subject_5)
print("Total marks of",student_name,  "is :",total_marks)
print("The Percentage of",student_name,  " is :",percentage,"%") 
1 Like
student_name = input("enter your name : ")

student_class = input("enter your class : ")

student_section = input("enter your section :")

maths = float(input("enter your maths marks :"))

science = float(input("enter your science marks :"))

history = float(input("enter your history marks :"))

geography = float(input("enter your geography marks :"))

economics = float(input("enter your economics marks :"))

marks_sum = (maths+science+history+geography+economics)

percentage = (marks_sum/500)*100

print(marks_sum)

print(percentage)

student_name = input(“Enter the studnet name:”)

student_class = input(“Enter the class name:”)

student_section = input(“Enter the studnet section:”)

subject_1 = int(input(“Enter the subject_1 marks out of 100:”))

subject_2 = int(input(“Enter the subject_2 marks out of 100:”))

subject_3 = int(input(“Enter the subject_3marks out of 100:”))

subject_4 = int(input(“Enter the subject_4 marks out of 100:”))

subject_5 = int(input(“Enter the subject_5 marks out of 100:”))

Total_marks = subject_1+subject_2+subject_3+subject_4+subject_5

Percentage = (Total_marks/500)*100

print(student_name," “,student_class,” ",student_section)

print("subject_1 : ", subject_1 )

print("subject_2 : ", subject_2 )

print("subject_3 : ", subject_3 )

print("subject_4 : ", subject_4 )

print("subject_5 : ", subject_5 )

print(“total marks of the students=”,Total_marks)

print(“total percentage of the students=”,Percentage)

student_name=input((“name:”))

student_class=input((“class:”))

student_section=input((“section:”))

english_mark=int(input(“english mark:”))

maths_mark=int(input(“maths mark:”))

statistics_mark=int(input(“statistics mark:”))

science_mark=int(input(“science mark:”))

social_mark=int(input(“social mark:”))

total_marks=(english_mark+maths_mark+statistics_mark+science_mark+social_mark)

print(“total marks:”,total_marks)

percentage=(total_marks/500)*100

print(“percentage”,percentage)

print(“name:”,student_name)

print(“class:”,student_class)

print(“section:”,student_section)

print(“english mark:”,english_mark)

print(“maths mark:”,maths_mark)

print(“statistics mark:”,statistics_mark)

print(“science mark:”,science_mark)

print(“social mark:”,social_mark)

print(“total mark:”,total_marks)

print(“percentage”,percentage)

name=str(input("Student name:"))

_class=int(input("Student class:"))

section=str(input("Student's section:"))

sub1=int(input("subject 1:"))

sub2=int(input("subject 2:"))

sub3=int(input("subject 3:"))

sub4=int(input("subject 4:"))

sub5=int(input("subject 5:"))

print("Students name:",name)

print("Student's class:",_class)

print("Student's secton:",section)

Total_marks=sub1+sub2+sub3+sub4+sub5

print("Total Marks:",Total_marks)

percentage=(Total_marks/500)*100

print("Percentage:",percentage)Preformatted text

student_name=input(“enter name:”)
student_class=input(“enter class:”)
section=input(“enter section:”)
print(“subjects:”)
Hindi=int(input(“”))
English=int(input(“”))
maths=int(input(“”))
science=int(input(“”))
print(“student_name”,student_name)
print(“student_class”,student_class)
print(“section”,section)
total=Hindi+English+maths+science
print(total)
avg=total/4
print(“average:”,avg)
output:—enter name:mamatha
enter class:15
enter section:a
subjects:
50
50
60
70
student_name mamatha
student_class 15
section a
230
average: 57.5