Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the Script in Python. courseCategories = [Mathematics,Computer Science,Business,Economics,Literature,Art,Music] Sample of the output. It should look same as the output. 'SR' - Sort a. b.

Write the Script in Python.

courseCategories = ["Mathematics","Computer Science","Business","Economics","Literature","Art","Music"]

image text in transcribed

Sample of the output. It should look same as the output.

image text in transcribed

image text in transcribed

'SR' - Sort a. b. 1. This operation will display the list before being sorted Display the list to the user after being sorted 2. 'CC-Character Count This operation will prompt the user for an index as an integer that will be the location to reference in the list If the integer is less than 0 or greater than the last possible index in the list, display the following error message: a. b. i. "You entered an invalid index!" If the integer is a valid index value, display the value in the list at that index along with its associated length using the following message: c. i. "The value at index is and is characters long." "SR' - Sort MENU *SR Sort * CC Character Count* *AS Add String EX EXIT Enter your choice: Sr BEFORE SORT ['Mathematics', "Computer Science', 'Business', 'Economics', Literature', 'Art', 'Music'] AFTER SORT:'Art', 'Business', 'Computer Science','Economics', 'Literature', 'Mathematics', 'Music' End of Project #4 End of Pryect "i CC'-Character Count Valid Index Value MENU *SR- Sort *CC- Character Count * * AS - Add String *EX - EXIT Enter your choice: cc Enter an index for the list: 5 The value at index 5 is Art and is 3 characters long End of Project #4 Invalid Index Value MENU *SR- Sort *CC - Character Count * * AS - Add String * EX - EXIT Enter your choice: cc Enter an index for the list: 10 You entered an invalid index! End of Project #4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

LO2 Explain the nature of the psychological contract.

Answered: 1 week ago

Question

LO1 Discuss four different views of motivation at work.

Answered: 1 week ago