I’m sorry, I am a complete noob to programming and the python language. I am in my first intro CS class and I cannot figure out how to get a loop to restart in the following code following the last elif statement:
Course_Room = {
‘CS101’: ‘3004’,
‘CS102’: ‘4501’,
‘CS103’: ‘6755’,
‘NT110’: ‘1244’,
‘CM241’: ‘1411’
}
Course_Instructor = {
‘CS101’: ‘Haynes’,
‘CS102’: ‘Alvarado’,
‘CS103’: ‘Rich’,
‘NT110’: ‘Burke’,
‘CM241’: ‘Lee’
}
Course_Meeting = {
‘CS101’: ‘8:00 a.m.’,
‘CS102’: ‘9:00 a.m.’,
‘CS103’: ‘10:00 a.m.’,
‘NT110’: ‘11:00 a.m.’,
‘CM241’: ‘1:00 p.m.’
}
def main():
# Create a variable for the user input looking up a course.
course = input('Enter the course number you are trying to look up. ')
if course in Course_Room and Course_Instructor and Course_Meeting:
print(f'Course Room # is: {Course_Room[course]}.')
print(f'Course Instructor is: {Course_Instructor[course]}')
print(f'Course Meeting time is: {Course_Meeting[course]}')
elif course not in Course_Room or Course_Instructor or Course_Meeting:
print('Please enter a valid course number.')
if name == ‘main’:
main()
Also this is my very first post and if this not the proper channel to be posting these types of questions can someone please direct me to the proper channel for beginner style problems and questions? Thanks in advance.