Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Create a tuple that contains course codes: (2400', '3560', '3140', '3040','4100', '4700', '4500) Do the following: a) Convert the tuple to a tuple that

image text in transcribed

4. Create a tuple that contains course codes: (2400', '3560', '3140', '3040','4100', '4700', '4500") Do the following: a) Convert the tuple to a tuple that changes the course abbreviations to full course names with the COMP-): ("COMP-2400', 'COMP-3560', 'COMP-3140", "COMP-3040", "COMP-4100', 'COMP-4700', 'COMP-4500"). Print it b) Let Python randomly select a course and print the course. c) Finally, make a new tuple with the randomly selected course replaced by the word "LuckyCourse" in the tuple. Print the new tuple. Running example: The original tuple of abbreviation is: (2400', '3560', '3140', '3040', '4100', '4700', '4500') The tuple of full-name is: (COMP-2400', 'COMP-3560', 'COMP-3140', 'COMP-3040', 'COMP-4100', 'COMP-4700', 'COMP-4500') Your lucky course is: COMP-4700 The new tuple is: (COMP-2400', 'COMP-3560', 'COMP-3140', 'COMP-3040', 'COMP-4100', 'luckyCourse', 'COMP-4500')

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

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

=+a. What kind of personality does the brand have?

Answered: 1 week ago

Question

7. Discuss the implications of a skill-based pay plan for training.

Answered: 1 week ago

Question

4. Make recommendations on steps to take to melt the glass ceiling.

Answered: 1 week ago