1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
bulgar [2K]
3 years ago
13

) Python command line menu-driven application that allows a user to display, sort and update, as needed a List of U.S states con

taining the state capital, overall state population, and state flower. The Internet provides multiple references with these lists. For example:
Computers and Technology
1 answer:
Dimas [21]3 years ago
4 0

Answer:

Explanation:

The following is a Python program that creates a menu as requestes. The menu allows the user to choose to display list, sort list, update list, and/or exit. A starting list of three states has been added. The menu is on a while loop that keeps asking the user for an option until exit is chosen. A sample output is shown in the attached picture below.

states = {'NJ': ['Trenton', 8.882, 'Common blue violet'], 'Florida':['Tallahassee', 21.48, 'Orange blossom'], 'California': ['Sacramento', 39.51, 'California Poppy']}

while True:

   answer = input('Menu: \n1: display list\n2: Sort list\n3: update list\n4: Exit')

   print(type(answer))

   if answer == '1':

       for x in states:

           print(x, states[x])

   elif answer == '2':

       sortList = sorted(states)

       sorted_states = {}

       for state in sortList:

           sorted_states[state] = states[state]

       states.clear()

       states = sorted_states

       sorted_states = {}

   elif answer == '3':

       state = input('Enter State: ')

       capital = input('Enter Capital: ')

       population = input('Enter population: ')

       flower = input('Enter State Flower: ')

       states[state] = [capital, population, flower]

   else:

       break

You might be interested in
Justify the statement "The same job title can have different job roles and different qualification criteria in different organiz
Colt1911 [192]

Answer:

anng elsi

Explanation:

3 0
3 years ago
"In spreadsheet programs, labels and constant values are always copied exactly to the new location; what happens to formulas whe
Alex17521 [72]

Answer: Absolute cell referencing

Explanation:

 The absolute cell referencing is one of the type of cell reference address that basically contain the dollar sign in the spreadsheet applications. It is one of the important element as it helps in referring the constant values in the spreadsheet programs.

  • The absolute cell referencing is copied and also moved from one cell to another in the new location.
  • The size and also the shape are also remain constant in the spreadsheet.

According to the given question, the absolute cell referencing is also known as the relative cell referencing as they use the formulas for copied the values in the microsoft office excel for find out the data.

 Therefore, Absolute cell referencing is the correct answer.

8 0
3 years ago
Hi guys, so I dont have a homework related question. I was just wondering if it was possble to upload screenshots on Brainly ins
Anastaziya [24]

Answer:

yes it is possible to upload a screenshot on brainly

7 0
3 years ago
When a user runs an application, what transfers from a storage device to memory?
jolli1 [7]
It is:
b. instructions


6 0
3 years ago
What is the output of code corresponding to the following program segment if ?
wolverine [178]

Answer:

a. You are eligible to vote.

Explanation:

If Age >= 18 Then

Write "You are eligible to vote."

Else

Set - Age

Write "You can vote in " + Years + " years."

End If

The above code block is an example of if-else code block. The if-else code block follow a pattern of:

If (expression) then

else

(expression)

end if

Based on the if Age>= 18 condition, the output will be "You are eligible to vote."

4 0
3 years ago
Other questions:
  • Which of the following is a justification for giving a Page Quality (PQ) rating of Lowest? Select all that apply. True False The
    7·1 answer
  • A ______________ is a document created when planning resource management to help promote teamwork and clarify team communication
    13·1 answer
  • Type the correct answer in the box. Spell the word correctly. What aspect should you consider before adding pictures to a docume
    7·2 answers
  • Whats the Sioux City school wifi?
    15·2 answers
  • 1.
    6·1 answer
  • Henry is sent to work with a customer at the company’s satellite branch in another town. During his visit, he notices that most
    6·1 answer
  • Jan pays $70 each month for her auto insurance policy . The regular payment is called a
    6·1 answer
  • In order to consolidate your theoretical knowledge into technique and skills with practical and applicational value, you will us
    8·1 answer
  • Find the largest and smallest byte,short,int,long,float, and double. Which of these data types requires the least amount of memo
    5·1 answer
  • A _____ network is where all computers are equal and each one is both data requester and data provider.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!