I have created a program that calculates the average of a student, and I want input to be created based on the user input, for example: if the user types 5, it creates 5 input.
print('Average of students')
def student_average():
while True:
try:
# I want to create inputs depending on the user's input in the following question:
number_of_qualifications = int(input('What is the number of qualifications?: '))
qualification_1 = float(input('What is the first qualification?: '))
qualification_2 = float(input('What is the second qualification?: '))
qualification_3 = float(input('What is the third qualification?: '))
qualification_4 = float(input('What is the fourth qualification?: '))
break
except:
print('This is not an option')
sum = (qualification_1 + qualification_2 + qualification_3 + qualification_4)
average = (sum / 4)
print(average)
student_average()