Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use python only Write a program that allows the user to insert a colour name in the following list, at a chosen position, only if

image text in transcribed

use python only

Write a program that allows the user to insert a colour name in the following list, at a chosen position, only if this name is not already in the list. colours =[" Red", "Yellow", "Green", "Purple", "Orange", "Cyan", "Magenta"] The user is asked to enter the colour name to be inserted, and the colour name it should be inserted before in the list. If the user wants to insert the new colour at the end, the user enters "End". Then, the program inserts the new word at the chosen position, and prints the updated list. Note: - The output must be in the format shown in the examples below, including the format of the prompt, and all spaces and punctuation. - The new colour is only inserted if it is not already in the list. For example

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_2

Step: 3

blur-text-image_3

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

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions

Question

1. Does the promotion policy make sense? Why or why not?

Answered: 1 week ago

Question

5. Identify and describe nine social and cultural identities.

Answered: 1 week ago

Question

2. Define identity.

Answered: 1 week ago

Question

4. Describe phases of majority identity development.

Answered: 1 week ago