Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

Number of replies: 62
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Nazmus Salehin -
i=0
while i<8:
user_input=input("What's your roll no?")
first_sub_score=int(input("what's your 1st sub score?"))
second_sub_score = int(input ("what's your 2nd sub score?"))
third_sub_score = int( input("what's your 3rd sub score?"))
total=float((first_sub_score+second_sub_score+third_sub_score)/3)
print(total)
i=i+1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md. Mazbaur Rashid (MMR) -
Md. Mazbaur Rashid
192-15-2837
def avg(sub1, sub2, sub3):
    avg = (sub1 + sub2 + sub3)/3
    return avg
def main():
    for i in range(8):
        Student_roll = input("Enter roll of the student: ")
        sub1 = float(input("Enter number of first subject: "))
        sub2 = float(input("Enter number of second subject: "))
        sub3 = float(input("Enter number of third subject: "))
        print("Student's Roll: ", Student_roll)
        print("Average marks out of 100: %.2f" % avg(sub1,sub2,sub3))
main()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Siam Ahmed -
"""
a program to print the roll number
and average marks of 8 students in
three subjects (each out of 100)
"""

roll = [1, 2, 3, 4, 5, 6, 7, 8]
avgNumber = []

count = 0
while count < 8:
count = count + 1
subject1 = float(input("Enter the first subject mark: "))
subject2 = float(input("Enter the second subject mark: "))
subject3 = float(input("Enter the third subject mark: "))

avg = float((subject1 + subject2 + subject3) / 3.00)
avgNumber.append(avg)

i = 0
for i in range(8):
print("Roll:", roll[i])
print("Average Mark:", avgNumber[i])
i = i + 1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md. Safiqul Islam Nasim -
cnt = 0 ;
for i in range(0 , 7):
a = int(input("Enter 1st Subject Mark "))
b = int(input("Enter 2nd Subject Mark "))
c = int(input("Enter 3rd Subject Mark "))
sum = int(a+b+c)
#print(sum)
avg = float(sum / 3.00)
cnt = cnt + 1
print("Student Roll {} Avarage Number {}".format(cnt,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md Rana hossain (192-15-13109) -
count = 0 ;
for i in range(0 , 7):
a = int(input("Enter 1st Subject Mark "))
b = int(input("Enter 2nd Subject Mark "))
c = int(input("Enter 3rd Subject Mark "))
sum = int(a+b+c)
#print(sum)
avg = float(sum / 3.00)
count = count + 1
print("Student Roll {} Avarage Number {}".format(count,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Sanjina Nowshin Moon -
count = 0
while count < 8:
count = count + 1
sub1 = float(input("Enter the first subject mark: "))
sub2 = float(input("Enter the second subject mark: "))
sub3 = float(input("Enter the third subject mark: "))

avgerage = float((sub1 + sub2 + sub3) / 3.00)
avgerageNumber.append(avgerage)

i = 0
for i in range(8):
print("Roll:", roll[i])
print("Average Mark:", avgerageNumber[i])
i = i + 1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md. Rafeul Islam Rafe -
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.

i=1
j=1
while i<=8:
roll=input("Roll : ")
fist=float(input("Enter first number : "))
second=float(input("Enter second number : "))
third=float(input("Enter third number : "))
avarage = float((fist+second+third)/3.00)

i = i + 1

print("Student roll :: ",roll)
print("Avarage :: ", avarage)
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Afroja Rahman -
count = 0 ;
for i in range(0 , 7):
s1 = int(input("Enter 1st Subject Mark "))
s2 = int(input("Enter 2nd Subject Mark "))
s3= int(input("Enter 3rd Subject Mark "))
sum = int(s1+s2+s3)
avg = float(sum / 3.00)
count = count + 1
print("Student Roll {} Average Number {}".format(count,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Ismot samia 192-15-13028 -
i=1
j=1
while i<=8:
roll=input("Roll : ")
first=float(input("Enter first number : "))
second=float(input("Enter second number : "))
third=float(input("Enter third number : "))
avarage = float((sub1+sub2+sub3)/3.00)

i = i + 1

print("Student roll :: ",roll)
print("Avarage :: ", avarage)
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Shahid Shahriar -
count = 0 ;
for a in range(0 , 7):
x = int(input("Enter first Subject Mark "))
y = int(input("Enter second Subject Mark "))
z = int(input("Enter third Subject Mark "))
sum = int(x+y+z)
#print(sum)
avg = float(sum / 3.00)
count = count + 1
print("Student Roll {} Average Number {}".format(count, avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Tawhid Ahmed Komol 192-15-2861 -
for i in range(8):
id = input("Enter student ID: ")
sub1 = float(input("Enter first subject's mark: "))
sub2 = float(input("Enter second subject's mark: "))
sub3 = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((sub1+sub2+sub3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Zafrin All Mustary -
t = 0 ;
for i in range(0 , 7):
x = int(input("Enter first subject mark "))
y = int(input("Enter second subject mark "))
z = int(input("Enter third subject mark "))
sum = int(x+y+z)
avg = float(sum / 3.00)
t = t+ 1
print("Student ID {} Avarage Marks {}".format(t,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md. Sabbir Hossain 192-15-2809 -
for i in range(8):
id = input("Enter student ID: ")
subjectOne = float(input("Enter first subject's mark: "))
subjectTwo = float(input("Enter second subject's mark: "))
subjectThree = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((subjectOne+subjectTwo+subjectThree)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Sajia Afrin 192-15-2907 -
def average(s1, s2, s3):
average = (s1 + s2 + s3)/3
return average
def main():
for i in range(8):
roll = input("Enter Roll Number: ")
s1 = float(input("Enter Number of First Subject: "))
s2 = float(input("Enter Number of Second Subject: "))
s3 = float(input("Enter Number of Third subject: "))
print("Student's Roll: ", roll)
print("Average Marks : %.2f" % average(s1,s2,s3))
main()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Shahariar Sarowar Mampy 192-15-2856 -
for i in range(8):
id = input("Enter student ID: ")
sub1 = float(input("Enter first subject's mark: "))
sub2 = float(input("Enter second subject's mark: "))
sub3 = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((sub1+sub2+sub3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Jannatul Anjum Shafa 192-15-2787 -
for i in range(8):
id = input("Enter student roll: ")
s1 = float(input("first subject mark: "))
s2 = float(input("second subject mark: "))
s3 = float(input("third subject mark: "))
print("Student Roll: ", id)
print("Average marks: "+"{:.2f}".format((s1+s2+s3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Liza Meem 192-15-2903 -
for i in range(8):
id = input("Enter student ID: ")
sub1 = float(input("Enter first subject's mark: "))
sub2 = float(input("Enter second subject's mark: "))
sub3 = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((sub1+sub2+sub3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by S. M Rifat Abdullah Tamim 192-15-2797 -
def average(sub1,sub2,sub3):
average = (sub1 + sub2 + sub3) / 3
return average
def mark():
for i in range(1,8):
roll_number = input()
sub1 = float(input())
sub2 = float(input())
sub3 = float(input())
print(roll_number)

print('%.2f' % average(sub1 + sub2 + sub3))
mark()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Jannatul Islam -
#JANNATUL ISLAM 192-15-13064
#COLLECT DATA FROM USER AND CALCULATE AVERAGE
i=0
for i in range(0,7):
user_input=input("Enter Roll no: ")
print("Information for Roll no:"+user_input)
first_sub_marks = int(input("Enter first subject mark : "))
second_sub_marks = int(input ("Enter second subject mark : "))
third_sub_marks = int( input("Enter third subject mark : "))
average= float((first_sub_marks+second_sub_marks+third_sub_marks)/3)
print("Student roll {} Average Marks {}".format(user_input,average))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Farjana Islam Asha 192-15-2895 -
def average(x, y, z):
average = (x + y + z)/3
return average
def main():
for i in range(8):
ID = input("Enter Roll Number: ")
x = float(input("Enter Number of First Subject: "))
y = float(input("Enter Number of Second Subject: "))
z = float(input("Enter Number of Third subject: "))
print("Student's ID: ", ID)
print("Average Marks : %.2f" % average(x,y,z))
main()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md. Ataur Rahman -

for i in range(8):
id = input("Enter student ID: ")
s1 = float(input("Enter first subject's mark: "))
s2 = float(input("Enter second subject's mark: "))
s3 = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((s1+s2+s3)/3))

In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Hasna Jahan Suborna 192-15-13066 -
c = 0 ;
for i in range(0 , 7):
subject_1 = int(input("Enter 1st Subject Mark "))
subject_2 = int(input("Enter 2nd Subject Mark "))
subject_3= int(input("Enter 3rd Subject Mark "))
sum = int(subject_1+subject_2+subject_3)
avg = float(sum / 3.00)
c = c + 1
print("Student Roll {} Average Number {}".format(c,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Momotaz Zahan Mim -
for i in range(8):
id = input("Enter student ID: ")
st1 = float(input("Enter first subject's mark: "))
st2 = float(input("Enter second subject's mark: "))
st3 = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((st1+st2+st3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Siam Ahamed -
cnt = 0 ;
for i in range(0 , 7):
a = int(input("Enter 1st Subject Mark "))
b = int(input("Enter 2nd Subject Mark "))
c = int(input("Enter 3rd Subject Mark "))
sum = int(a+b+c)
#print(sum)
avg = float(sum / 3.00)
cnt = cnt + 1
print("Student Roll {} Avarage Number {}".format(cnt,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Sabrina islam 192-15-2865 -
for i in range(8):
ID = input("Enter student ID: ")
sub1 = float(input("Enter first subject's mark: "))
sub2 = float(input("Enter second subject's mark: "))
sub3 = float(input("Enter third subject's mark: "))
print("Student's ID: ", ID)
print("Average marks: "+"{:.2f}".format((sub1+sub2+sub3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Mafia Islam Sinthia 192-15-2815 -
for i in range(8):
id = input("Enter student ID: ")
subjectOne = float(input("Enter first subject's mark: "))
subjectTwo = float(input("Enter second subject's mark: "))
subjectThree = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((subjectOne+subjectTwo+subjectThree)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Mohammad Dipo Sultan -
def average(sub1, sub2, sub3):
aver=(sub1+sub2+sub3)/3.00
return aver

i=0
while i<8:
Roll=input("Enter your roll number: ")
sub1=float(input("Enter your first subject mark: "))
sub2=float(input("Enter your second subject mark: "))
sub3=float(input("Enter your third subject mark: "))
print("Roll Number: "+Roll)
print("Average Mark Out Of 100:", average(sub1,sub2,sub3))
i+=1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md. Sabbir Alam 192-15-2847 -
def Avg(s1, s2, s3):
Avg = (s1 + s2 + s3)/3
return Avg
def main():
for i in range(8):
Student_roll = input("Enter roll of the student: ")
s1 = float(input("Enter number of 1st subject: "))
s2 = float(input("Enter number of 2nd subject: "))
s3 = float(input("Enter number of 3rd subject: "))
print("Student's Roll: ", Student_roll)
print("Average marks out of 100: %.2f" % Avg(s1,s2,s3))
main()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Ruhani Akter -
i=1
while i<9:
roll =int(input("Enter roll no:"))
s1 = float(input("Enter mark of 1st subject:"))
s2 = float(input("Enter mark of 2nd subject:"))
s3 = float(input("Enter mark of 3rd subject:"))
av = float((s1+s2+s3)/3)
print(roll)
print(av)
i=i+1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md.Tawhidul Islam -
i=0
for i in range(0,7):
user_input=input("Enter Roll no: ")
print("Information for Roll no:"+user_input)
first_sub_marks = int(input("Enter first subject mark : "))
second_sub_marks = int(input ("Enter second subject mark : "))
third_sub_marks = int( input("Enter third subject mark : "))
average= float((first_sub_marks+second_sub_marks+third_sub_marks)/3)
print("Student roll {} Average Marks {}".format(user_input,average))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md.Sirajul Siddique 192-15-2845 -
count = 0
while count < 8:
count = count + 1
sub1 = float(input("Enter the first subject mark: "))
sub2 = float(input("Enter the second subject mark: "))
sub3 = float(input("Enter the third subject mark: "))

avgerage = float((sub1 + sub2 + sub3) / 3.00)
avgerageNumber.append(avgerage)

i = 0
for i in range(8):
print("Roll:", roll[i])
print("Average Mark:", avgerageNumber[i])
i = i + 1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Mizanur Rahman 192-15-2788 -
for i in range(8):
roll number = input("Enter student roll number: ")
subject1 = float(input("Enter first subject's mark: "))
subject2 = float(input("Enter second subject's mark: "))
subject3 = float(input("Enter third subject's mark: "))
print("Student's roll number: ", id)
print("Average marks: "+"{:.2f}".format((subject1+subject2+subject3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by kamruzzaman chowdhury -
count = 0 ;
for i in range(0 , 7):
a = int(input("Enter 1st Subject Mark "))
b = int(input("Enter 2nd Subject Mark "))
c = int(input("Enter 3rd Subject Mark "))
sum = int(a+b+c)
#print(sum)
avg = float(sum / 3.00)
count = count + 1
print("Student Roll {} Avarage Number {}".format(count,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by tamim rahman -
i=1
while i<=8:
roll=input("Roll : ")
fist=float(input("Enter first number : "))
second=float(input("Enter second number : "))
third=float(input("Enter third number : "))
avarage = float((fist+second+third)/3.00)

i = i + 1

print("Student roll : ",roll)
print("Avarage : ", avarage)
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Sujon Islam -
count = 0 ;
for i in range(0 , 7):
s1 = int(input("Enter 1st Subject Mark "))
s2 = int(input("Enter 2nd Subject Mark "))
s3= int(input("Enter 3rd Subject Mark "))
sum = int(s1+s2+s3)
avg = float(sum / 3.00)
count = count + 1
print("Student Roll {} Average Number {}".format(count,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by MD.Munim Shariair Galib -
t = 0 ;
for i in range(0 , 7):
x = int(input("Enter first subject mark "))
y = int(input("Enter second subject mark "))
z = int(input("Enter third subject mark "))
sum = int(x+y+z)
avg = float(sum / 3.00)
t = t+ 1
print("Student ID {} Avarage Marks {}".format(t,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Shamiul Karim Sompod -
count = 0
while count <= 7:
count = count + 1
subject1 = float(input("Enter the 1st subject mark: "))
subject2 = float(input("Enter the 2nd subject mark: "))
subject3 = float(input("Enter the 3rd subject mark: "))

avgerage = float((subject1 + subject2 + subject3) / 3.00)
avgerageNumber.append(avgerage)

i = 0
for i in range(7):
print("Roll:", roll[i])
print("Average Mark:", avgerageNumber[i])
i = i + 1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Easin Parvez(192-15-13197) -
cnt = 0 ;
for i in range(0 , 7):
a = int(input("Enter 1st Subject Mark "))
b = int(input("Enter 2nd Subject Mark "))
c = int(input("Enter 3rd Subject Mark "))
sum = int(a+b+c)
#print(sum)
avg = float(sum / 3.00)
cnt = cnt + 1
print("Student Roll {} Avarage Number {}".format(cnt,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Jannatul Fardus Armin 192-15-2802 -
count = 0 ;
for i in range(0 , 7):
a = int(input("Enter 1st Subject Mark "))
b = int(input("Enter 2nd Subject Mark "))
c = int(input("Enter 3rd Subject Mark "))
sum = int(a+b+c)
#print(sum)
avg = float(sum / 3.00)
count = count + 1
print("Student Roll {} Avarage Number {}".format(count,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Nakibul hoque Shohan 192-15-2808 -
for i in range(8):
id = input("Enter student ID: ")
sub1 = float(input("Enter first subject's mark: "))
sub2 = float(input("Enter second subject's mark: "))
sub3 = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((sub1+sub2+sub3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Mahfuzur Rahman(191-15-2638) -
for i in range(8):
roll number = input("Enter student roll number: ")
subject1 = float(input("Enter first subject's mark: "))
subject2 = float(input("Enter second subject's mark: "))
subject3 = float(input("Enter third subject's mark: "))
print("Student's roll number: ", id)
print("Average marks: "+"{:.2f}".format((subject1+subject2+subject3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Muhammad Rabiul Hossain -
n=8
while n>0:
id = int(input("Roll number ="))
sub1 = int(input("sub1 result "))
sub2 = int(input("sub2 result "))
sub3 = int(input("sub3 result "))
avg_result = float((sub1+sub2+sub3)/3)
print("roll",id,"avg result",avg_result)
n=n-1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Ayatullah jubaer 192-15-2786 -

for i in range(8):

id = input("Enter student ID: ")

sub1 = float(input("Enter first subject's mark: "))

sub2 = float(input("Enter second subject's mark: "))

sub3 = float(input("Enter third subject's mark: "))

print("Student's ID: ", id)

print("Average marks: "+"{:.2f}".format((sub1+sub2+sub3)/3))



In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Abu Salkin -
for i in range(8):
id = input("Enter student ID: ")
subjectOne = float(input("Enter first subject's mark: "))
subjectTwo = float(input("Enter second subject's mark: "))
subjectThree = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((subjectOne+subjectTwo+subjectThree)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md. Touhedur Rahman Khan Zihad 192-15-2775 -
def avg(sub01, sub02, sub03):
    avg = (sub01 + sub02 + sub03)/3
    return avg
def func():
    for i in range(8):
        student_roll = input("Enter roll of the student: ")
        sub01 = float(input("Enter number of first subject: "))
        sub02 = float(input("Enter number of second subject: "))
        sub03 = float(input("Enter number of third subject: "))
        print("Student's Roll: ", student_roll)
        print("Average marks out of 100: %.2f" % avg(sub01,sub02,sub03))
func()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md Sazzat Hossain -
for i in range(8):
id = input("Enter student ID: ")
sub1 = float(input("Enter first subject's mark: "))
sub2 = float(input("Enter second subject's mark: "))
sub3 = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((sub1+sub2+sub3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Shafa Islam (192-15-13050) -
for i in range(8):
ID = input("Enter student ID: ")
Subject1 = float(input("Enter Subject1 mark: "))
Subject2 = float(input("Enter Subject2 mark: "))
Subject3 = float(input("Enter Subject3 mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((st1+st2+st3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Easin Parvez(192-15-13197) -
i=0
while i<8:
user_input=input("What's your roll no?")
first_sub_score=int(input("what's your 1st sub score?"))
second_sub_score = int(input ("what's your 2nd sub score?"))
third_sub_score = int( input("what's your 3rd sub score?"))
total=float((first_sub_score+second_sub_score+third_sub_score)/3)
print(total)
i=i+1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Tonmoy Chandra Chando 192-15-2782 -
count = 0 ;
for i in range(0 , 7):
a = int(input("Enter 1st Subject Mark "))
b = int(input("Enter 2nd Subject Mark "))
c = int(input("Enter 3rd Subject Mark "))
sum = int(a+b+c)
#print(sum)
avg = float(sum / 3.00)
count = count + 1
print("Student Roll {} Avarage Number {}".format(count,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Abdullah Ibne Mortuza 192-15-13265 -
def avg(sub1, sub2, sub3):
avg = (sub1 + sub2 + sub3)/3
return avg
def main():
for i in range(8):
Student_roll = input("Enter roll of the student: ")
sub1 = float(input("Enter number of first subject: "))
sub2 = float(input("Enter number of second subject: "))
sub3 = float(input("Enter number of third subject: "))
print("Student's Roll: ", Student_roll)
print("Average marks out of 100: %.2f" % avg(sub1,sub2,sub3))
main()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Gazi Shahriar Samrat Hridoy -
#include
#include
main()
{
int roll_no,m1,m2,m3,total;
float average;
clrscr();
printf("Enter roll number : ");
scanf("%d",&roll_no);
printf("Enter marks 1 : ");
scanf("%d",&m1);
printf("Enter marks 2 : ");
scanf("%d",&m2);
printf("Enter marks 3 : ");
scanf("%d",&m3);
total=m1+m2+m3;
average=total/3.0;
printf("\nStudent Roll Number : %d",roll_no);
printf("\nMarks 1 : %d",m1);
printf("\nMarks 2 : %d",m2);
printf("\nMarks 3 : %d",m3);
printf("\nTotal : %d ",total);
printf("\nAverage : %f ",average);
getch();
}
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Shariar Kabir Nayeem 192-15-2854 -
for i in range(8):
id = input("Enter student ID: ")
sub1 = float(input("Enter first subject's mark: "))
sub2 = float(input("Enter second subject's mark: "))
sub3 = float(input("Enter third subject's mark: "))
print("Student's ID: ", id)
print("Average marks: "+"{:.2f}".format((sub1+sub2+sub3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Alif Pranto -
i=0
while i<8:
user_input=input("What's your roll no?")
first_sub_score=int(input("what's your 1st sub score?"))
second_sub_score = int(input ("what's your 2nd sub score?"))
third_sub_score = int( input("what's your 3rd sub score?"))
total=float((first_sub_score+second_sub_score+third_sub_score)/3)
print(total)
i=i+1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Sazzad Hossain -
def avg(sub1, sub2, sub3):
avg = (sub1 + sub2 + sub3)/3
return avg
def main():
for i in range(8):
Student_roll = input("Enter roll of the student: ")
sub1 = float(input("Enter number of first subject: "))
sub2 = float(input("Enter number of second subject: "))
sub3 = float(input("Enter number of third subject: "))
print("Student's Roll: ", Student_roll)
print("Average marks out of 100: %.2f" % avg(sub1,sub2,sub3))
main()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md Ashaduzzaman Maruf 192-15-2803 -
cnt = 0 ;
for i in range(0 , 7):
a = int(input("Enter 1st Subject Mark "))
b = int(input("Enter 2nd Subject Mark "))
c = int(input("Enter 3rd Subject Mark "))
sum = int(a+b+c)
#print(sum)
avg = float(sum / 3.00)
cnt = cnt + 1
print("Student Roll {} Avarage Number {}".format(cnt,avg))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md Muhiminul Islam Mahim 192-15-2850 -
Name:MD Muhiminul Islam Mahim
ID:192-15-2850
Section:PC-A
def avg(sub1, sub2, sub3):
avg = (sub1 + sub2 + sub3)/3
return avg
def main():
for i in range(8):
Student_roll = input("Enter roll of the student: ")
sub1 = float(input("Enter number of first subject: "))
sub2 = float(input("Enter number of second subject: "))
sub3 = float(input("Enter number of third subject: "))
print("Student's Roll: ", Student_roll)
print("Average marks out of 100: %.2f" % avg(sub1,sub2,sub3))
main()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Hasiba Ferdous 192-15-2820 -
Md. Mazbaur Rashid
192-15-2837
def avg(sub1, sub2, sub3):
avg = (sub1 + sub2 + sub3)/3
return avg
def main():
for i in range(8):
Student_roll = input("Enter roll of the student: ")
sub1 = float(input("Enter number of first subject: "))
sub2 = float(input("Enter number of second subject: "))
sub3 = float(input("Enter number of third subject: "))
print("Student's Roll: ", Student_roll)
print("Average marks out of 100: %.2f" % avg(sub1,sub2,sub3))
main()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Md. Mehedi Hasan Sakib 192-15-2806 -
def avg(sub01, sub02, sub03):
avg = (sub01 + sub02 + sub03)/3
return avg
def func():
for i in range(8):
student_roll = input("Enter roll of the student: ")
sub01 = float(input("Enter number of first subject: "))
sub02 = float(input("Enter number of second subject: "))
sub03 = float(input("Enter number of third subject: "))
print("Student's Roll: ", student_roll)
print("Average marks out of 100: %.2f" % avg(sub01,sub02,sub03))
func()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Al- Maruf 192-15-2821 -
for i in range(8):
roll number = input("Enter student roll number: ")
subject1 = float(input("Enter first subject's mark: "))
subject2 = float(input("Enter second subject's mark: "))
subject3 = float(input("Enter third subject's mark: "))
print("Student's roll number: ", id)
print("Average marks: "+"{:.2f}".format((subject1+subject2+subject3)/3))
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by NAZMUL HASSAN sanim -
i=0
while i<8:
user_input=input("What's your roll no?")
first_sub_score=int(input("what's your 1st sub score?"))
second_sub_score = int(input ("what's your 2nd sub score?"))
third_sub_score = int( input("what's your 3rd sub score?"))
total=float((first_sub_score+second_sub_score+third_sub_score)/3)
print(total)
i=i+1
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Nazmus Sakib Tanim (192-15-2855) -
def avg(sub1, sub2, sub3):
avg = (sub1 + sub2 + sub3)/3
return avg
def main():
for i in range(8):
Student_roll = input("Enter roll of the student: ")
sub1 = float(input("Enter number of first subject: "))
sub2 = float(input("Enter number of second subject: "))
sub3 = float(input("Enter number of third subject: "))
print("Student's Roll: ", Student_roll)
print("Average marks out of 100: %.2f" % avg(sub1,sub2,sub3))
main()
In reply to First post

Re: Write a program to print the roll number and average marks of 8 students in three subjects (each out of 100). The marks are entered by user.

by Meherol Hasan -
count = 0
while count < 8:
count = count + 1
subj1 = float(input("Enter the 1st subject mark: "))
subj2 = float(input("Enter the 2nd subject mark: "))
subj3 = float(input("Enter the 3rd subject mark: "))

avgerage = float((subj1 + subj2 + subj3) / 3.00)
avgerageNumber.append(avgerage)

i = 0
for i in range(8):
print("Roll:", roll[i])
print("Average Mark:", avgerageNumber[i])
i = i + 1