Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

BOTIGFXVS.J92X38b/edit hw3 part3.py (8 points) Make a system which asks first how many steps it should run. For each step do one of the three

image text in transcribed
BOTIGFXVS.J92X38b/edit hw3 part3.py (8 points) Make a system which asks first how many steps it should run. For each step do one of the three things here: 1. "add [name]"-add name to list 2. "remove [name]" remove name from list a. if the name is not in the list, inform the user and don't crash 3. "max" output the max length name, if there is a tie, then output the last name in lexicographic order. (you are not permitted to use .sort() or sorted() for this, instead consider using the operators for strings) We won't use spaces in the name, so you can use split again. linux [0] $ python3 hw3_part3.py How many steps should we run? 6 Enter command: add Alex Alex added. Enter command: add Samantha Samantha added. Enter command: add Jill Jill added Enter command: max The max name is Samantha Enter command: remove Samantha Samantha removed. Enter command: max The max name is Jill

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions