Question: Instructions In this programming assignment, students will show mastery over loops, string methods, and simple list methods. You will be writing the processing section of

Instructions
In this programming assignment, students will show mastery over loops, string methods, and simple list methods. You will be writing the processing section of the code -- you should not make any changes to the output section. You may add several more sample port summary
Using the provided input and output section, develop a processing section to handle the following scenario:
You are working for a major networking company that stores the VLAN configuration of their switches in a compact format. The format is a list of strings. Each string has the following format: port number state. The port number can be a single digit or a start/end range. The state can be one of the following: untagged, excluded, tagged. The ports will always be in order.
# Input -- keep the following entries -- you may add others for testing
portSummary =("1-11 untagged", "12 excluded")
#portSummary =("1-6 untagged", "7 excluded", "8-12 untagged")
# Processing (Your Code goes here
# Output -- Do not change any of the code in Output
print("Port Details")
for port in portDetails:
print(port)
Sample Output
Output 1
Port Details
1: untagged
2: untagged
3: untagged
4: untagged
5: untagged
6: untagged
7: untagged
8: untagged
9: untagged
10: untagged
11: untagged
12: excluded
Output 2
Port Details
1: untagged
2: untagged
3: untagged
4: untagged
5: untagged
6: untagged
7: excluded
8: untagged
9: untagged
10: untagged
11: untagged
12: untagged
Rules of Engagement
Violating the rules of engagement will lead to a grade of zero.
The first three lines of the program should be comments that show: student name, course, and assignment.
There should be three sections with a comment label: Input, Processing, and Output - the code should be beneath the comment.
Input -- code that gathers information from the user.
Processing -- code that uses the input to support the output.
Output -- code that displays the results.
The following data types are allowed: string, integer, float, and Boolean. A list may be used to support the output.
Only print statements are allowed in the Output section - each print statement is permitted a single string literal with variables. The variables may be in-line or in a format list. Print statements with expressions are not allowed this includes functions.
You should only use constructs that have been provided in lessons 17.
You should not be writing any functions.

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 Accounting Questions!