Python Forum
python program that calculat grades of students
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python program that calculat grades of students
#1
hello i need help .. i want to code python program that calculat grades of students from 2 lists.

first list is final exam grade. second list is homework final grade list.

the wight of the score is 75% for exam grade (list 1) Each grade represents a different student and 25% for homework grade (list 2).

If the student fails the test then only the test score is calculated.



list1[ 70 , 80 , 90 ]
st1 st2 st3
list2[67 , 70, 56]
Reply
#2
Welcome to the forum. We are glad to help, but we are not great at writing homework for you.
What have you tried so far? What problem you are stuck with?
Please, post your code in python tags tags, full traceback - in error tags, etc.
See BBcode help for more info.
Ask specific questions.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
exam = [70, 80, 75]
homework = [100, 80, 60]
for i in exam:
    if exam[i]<50
        print exam[i]
    else 
     for y in homework:
       return(0.75*exam[i]+0.35*homework[y])
Reply
#4
you need to iterate over both list simultaneously. There are different ways to do so. I would suggest you look at this thread from our tutorial section and try to solve the problem on your own:
https://python-forum.io/Thread-Basic-Nev...n-sequence

Just that you don't miss the excellent link in the first post of the thread: https://nedbatchelder.com/text/iter.html
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Grades Code": Anthony 14 1,255 Nov-24-2023, 07:41 AM
Last Post: buran
  Calculate median for school grades per subject siki 1 1,885 May-10-2021, 11:41 AM
Last Post: jefsummers
  Top 3 students banidjamali 4 2,277 Jan-17-2021, 11:59 AM
Last Post: banidjamali
  python dictionary for students records atux_null 12 19,013 Nov-12-2017, 04:47 PM
Last Post: atux_null

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020