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 16:10
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
question
Engineering, 04.07.2019 18:10
An air compression refrigeration system is to have an air pressure of 100 psia in the brine tank and an allowable air temperature increase of 60°f for standard vapor compression cycle temperatures of 77 f entering the expansion cylinder and 14 f entering the compression cylinder, calculate the coefficient of performance a. 2.5 b 3.3 c. 4.0 d. 5.0
Answers: 3
question
Engineering, 04.07.2019 18:20
Inadequate stores control is not an obstacle to effective work order system. (clo4) a)-true b)-false
Answers: 3
question
Engineering, 04.07.2019 18:20
The characteristic roots of a dynamic system are: 1.7920 1.8160 i, -1.7920 1.8160 i, -0.4160 what is the order of this system? what are the settling time and damping ratio of the system?
Answers: 3
You know the right answer?
Hello, i am currently taking a course in data structures with python. here is my question:
Questions
question
Mathematics, 09.04.2021 05:10
question
Mathematics, 09.04.2021 05:10
question
English, 09.04.2021 05:10
question
Mathematics, 09.04.2021 05:10
Questions on the website: 13722361