(Solved):(IN PYTHON) Course codes in a community consist of two parts: subject and course number. Subject must consist of 3 letters while course number must consist of 3 digits. For example, in the course c… View Answer…

 

Question

(IN PYTHON) Course codes in a community consist of two parts: subject and course number. Subject must consist of 3 letters while course number must consist of 3 digits. For example, in the course code ‘CIS115, subject is ‘CIS’, and course number is ‘115’. Write a program to do the following:

(a) Ask the user to enter a course code.

(b) Strip all the leading and trailing whitespace characters from the code.

Scroll to top