Write a program to get input from a student for their name, how many subjects they want to register, and the subject name. Your program should only ask to enter the subject name according to the number they provide. (Use loop concept). If they want to register for five subjects, your program should ask for the input for the subject name only five times
#get input from a student for their name, how many subjects they want to register,
studentName=input("Enter your name: ")
numberSubjects=int(input("How many subjects do you want to register?: "))
#ask to enter the subject name according to the number they provide.
for i in range(0,numberSubjects):
subjectName=input("Enter subject name: ")
Comments
Leave a comment