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
Abrake has a normal braking torque of 2.8 kip in and heat-dissipating cast-iron surfaces whose mass is 40 lbm. suppose a load is brought to rest in 8.0 s from an initial angular speed of 1600 rev/min using the normal braking torque; estimate the temperature rise of the heat dissipating surfaces.
Answers: 3
question
Engineering, 04.07.2019 18:10
Afour cylinder four-stroke in-line engine has a stroke of 160mm, connecting rod length of 150mm, a reciprocating mass of 3kg and its firing order is 1-3-4-2. the spacing between cylinders is 100mm. i. show that the engine is in balance with regard to the primary inertia forces and primary 3. a and secondary inertia couples. li determine the out of balance secondary inertia force ii. propose ways of balancing this out of balance force and discuss the challenges that will arise
Answers: 3
question
Engineering, 04.07.2019 18:10
The higher the astm grain-size number, the coarser the grain is. a)-true b)-false
Answers: 3
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
You know the right answer?
Hello, i am currently taking a course in data structures with python. here is my question:
Questions
question
Mathematics, 27.01.2021 21:40
question
History, 27.01.2021 21:40
question
Mathematics, 27.01.2021 21:40
Questions on the website: 13722360