Answer:
The Python code will be:
course_list =[]
decision=input('Enter A to add course, D to drop course, and E to exit:[A/D/E]')
decision=decision.upper()
while decision == 'A':
add_course=input("Enter course to add:")
add_course.upper()
if add_course in course_list:
print("You are already registered in that course")
print('Courses Registered:', course_list)
else:
course_list.append(add_course)
print('Course added')
print('Courses Registered:', course_list)
again=input('Enter A to add course, D to drop course, and E to exit:[A/D/E]')
while decision == 'D':
del_course=input('Enter course to drop:')
del_course.upper()
if del_course in course_list:
course_list.remove(del_course)
print('Course Dropped')
print('Courses Registered:', course_list)
else:
print('You are not registered for that course')
print('Courses Registered:', course_list)
again=input('Enter A to add course, D to drop course, and E to exit:[A/D/E]')
while decision == 'E':
print('Press ENTER to EXIT')