Engineering
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.

answer
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, bunnles
During a steady flow process, the change of energy with respect to time is zero. a)- true b)- false
Answers: 2
image
Engineering, 04.07.2019 18:20, RiverH246
Air flows over a heated plate àt a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point. the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
Answers: 1
image
Engineering, 05.07.2019 19:10, justin20080
Tech a says never use a water hose to clean up dust after a repair. tech b says never use a floor scrubber to clean up dust after repairs. who is correct?
Answers: 1
image
Engineering, 06.07.2019 02:30, chickennbutt0730
On solidification from a melt, the polymer polyethylene forms a semi-crystalline spherulite structure. (i) sketch an individual spherulite and label the amorphous and crystalline regions. (ii) draw a schematic to show the changes in specific volume with temperature during cooling from the melt, comparing it to the theoretical extremes of fully crystalline and fully amorphous (indicate tm and tg)
Answers: 2
Do you know the correct answer?
Hello, i am currently taking a course in data structures with python. here is my question:

Questions in other subjects:

Konu
Mathematics, 12.09.2021 23:50
Konu
Arts, 12.09.2021 23:50
Konu
SAT, 12.09.2021 23:50
Konu
Mathematics, 12.09.2021 23:50