+ 1
Write a Python function that accepts student names and marks (store in list). Calculate the total marks and average based on the input. Display student names and marks, total and average based on sample out below:
sample OutputïŒ Enter names:Philip,James,Mary,Lucy Enter marks:57,58,70,62 ~Output~ Students Name:Philip | Marks: 57 Students Name:James | Marks: 58 Students Name:Mary | Marks: 70 Students Name:Lucy | Marks: 62
6 Answers
+ 1
0
Thabks
- 1
I want to write a piece of code for the marks 27,26,45,61,56 average=43
- 3
TRY WITH THIS:
students = []
marks = []
num = input("How many students?: ")
for i in num:
name = input("input name of student "+ i)
students.append(name)
mark = input("input mark of the student")
marks.append(mark)
for i in num:
print(students[i] + ": "marks[i])
I THINK THAT WILL WORK.
- 5
students = []
marks = []
num = input("How many students?: ")
for i in num:
name = input("input name of student "+ i)
students.append(name)
mark = input("input mark of the student")
marks.append(mark)
for i in num:
print(students[i] + ": "marks[i])
- 6
okay đthanks