Question: 4 . Write a Python program ( named YourName _ SID _ Lab 7 d . py ) to ask user to input a record
Write a Python program named YourNameSIDLabdpy to ask user to input a record information of a course class, and handle this record accordingly. Write a main function:Ask user to input a course code, a course name and a class code.Construct a string recordstr containing strings, as "courseCode", "courseName", "classCode" and display itRepresent this record with a list variable aLst, by directly creating a list of this string elements, as the format: courseCode "courseName", "classCode"then display itRepresent and display this record with onestring, by creating a string representing the whole record from the list aLst in the format: "courseCode,courseName,classCode"
courseCode "courseName", "classCode"
"courseCode,courseName,classCode"
Represent and display the record with a list of strings, by creating a list of string back from one string format recordstr
"courseCode,courseName,classCode"
courseCode "courseName", "classCode"
Important: call the main at the end of the program to start execution.
Sample Program Output
CCIT Laboratory : Section
Please enter the course code: CCIT
Please enter the course name: Signal and Communication
Please enter the class code: CLO
Record displayed in a string: CCIT Signal and Communication, CL
Record displayed in a list: CCIT 'Signal and Communication', CL
Record displayed in one string converted from a list: CCIT Signal and Communication, CL
Record displayed in a list converted from one string: CCIT 'Signal and Communication', 'CLO
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
