subject
Engineering, 27.01.2020 22:31 ericv6796

Hello, i am currently taking a course in data structures with python. here is my question:

in this assignment, we will develop an algorithm to calculate the final grade for a class of 15 students. there are 5 assignments (20 points each) as well a midterm and a final (100 points each). another 10 points are for in-class participation.

all the assignments and tests contribute to the final grade equally. additionally, the in-class participation (either thru discussions or in real-time) is also a part of the final grade.

what i have so far:

# steven ochoa
# assignment_1.py

class student:

name = ""
net_id = ""
final_grade = ""
let_grade = ""

# class constructor
def , name, net_id, final_grade, let_grade):
self. name = name
self. netid = net_id
self. final_grade = final_grade
self. letter_grade = let_grade

# print student-line
def print_student(self):
print(self. formattemplate. format(self. studentid, self. studentname, self. assignmentsum, self. midterm, self. final,
slef. participation, self. totalgrade, self. lettergrade))

def add_grades ():

# gathering grades for the 5 assignments
print("insert assignment grades (20 point scale): ")

assignment1, assignment2, assignment3, assignment4, assignment5 = eval(input("enter your assignment grades: "))

# total grade for assignments

total = (assignment1+assignment2+assignment 3+assignment4+assignment5)

# gathering grades for the mid-term and the final
print("insert exam grades (100 point scale): ")

mid_term = eval(input("midterm grade: "))
final = eval(input("final grade: "))

# exam average
exam_average = (final + mid_term)/2

# participation points
print("insert participation grade (10 point scale) : ")

participation = eval(input("participation: "))

# final grade report
final_grade = (total*0.45) + (exam_average*0.45) + participation

return final_grade

def letter_grade(final_grade):

# calculates the letter grade
str(final_grade)

if final_grade > 100:
return "error! "
if 100 > = final_grade > 89:
return "final grade: ", final_grade, "a"
if 89 > = final_grade > 79:
return "final grade: ", final_grade, "b"
if 79 > = final_grade > 69:
return "final grade: ", final_grade, "c"
if 69 > = final_grade > 59:
return "final grade: ", final_grade, "d"
if 59 > = final_grade > 0:
return "final grade: ", final_grade, "f"
if 0 > final_grade:
return "error! "

def main(letter_grade, final_grade):

# introduction to the program
print("this program calculates your final grade.")

# set up loop for multiple students
student_list = []
another_student = "yes"

while another_student == "yes":
# adding another student
# gathering student information
name = input("what is the student's name? : ")
net_id = input("what is the student's net-id? : ")

f_grade = add_grades
let_grade = letter_grade(final_grade)

studentlist. append[(name, net_id, f_grade, let_grade)]
another_student = input("add another student? enter yes or no")

# create a header
# print table in a loop
for student in range(5):
print("student name: ", name, "net-id: ", net_id, "final grade: ", f_grade, "letter grade: ", let_grade)
print()
main()

the program runs, but it messes up after i input the student id.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Aflywheel accelerates for 5 seconds at 2 rad/s2 from a speed of 20 rpm. determine the total number of revolutions of the flywheel during the period of its acceleration. a.5.65 b.8.43 c. 723 d.6.86
Answers: 2
question
Engineering, 04.07.2019 18:10
Burgers vector is generally parallel to the dislocation line. a)-true b)-false
Answers: 2
question
Engineering, 04.07.2019 18:10
Journeyman training is usually related (clo2) a)-to specific tasks b)-to cost analysis of maintenance task c)-to control process to ensure quality d)-to installation of machinery
Answers: 2
question
Engineering, 04.07.2019 19:10
Acircular aluminum shaft mounted in a journal is shown. the symmetric clearance gap between the shaft and journal is filled with sae 10w-30 oil at t 30°c. the shaft is caused to turn by the attached mass and cord. develop and solve a differential equation for the angular speed of the shaft as a function of time.
Answers: 2
You know the right answer?
Hello, i am currently taking a course in data structures with python. here is my question:
Questions
question
Mathematics, 21.02.2020 02:00