Question: 4 . Write a Python program ( named YourName _ SID _ Lab 7 d . py ) to ask user to input a record

4. Write a Python program (named YourName_SID_Lab7d.py) 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 record_str containing 3 strings, as "courseCode", "courseName", "classCode" and display it..Represent this record with a list variable aLst, by directly creating a list of this 3 string elements, as the format: ["courseCode", "courseName", "classCode"]then display it.Represent and display this record with one-string, 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 record_str
"courseCode,courseName,classCode"
["courseCode", "courseName", "classCode"]
Important: call the main () at the end of the program to start execution.
Sample Program Output
CCIT4020 Laboratory 7: Section 4
Please enter the course code: CCIT4030
Please enter the course name: Signal and Communication
Please enter the class code: CLO3
Record displayed in a string: CCIT4030, Signal and Communication, CL03>
Record displayed in a list: ['CCIT4030', 'Signal and Communication', 'CL03']
Record displayed in one string converted from a list: CCIT4030, Signal and Communication, CL03>
Record displayed in a list converted from one string: ['CCIT4030', 'Signal and Communication', 'CLO3']
4 . Write a Python program ( named YourName _ SID

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!