Develop a program that asks the user to enter a capital for a U.S. state. Upon receiving the user input, the program reports whether the user input is correct. For this application, the 50 states and their capitals are stored in a two-dimensional array in order by state name. Display the current contents of the array then use a bubble sort to sort the content by capital. Next, prompt the user to enter answers for all the state capitals and then display the total correct count. The user's answer is not case-sensitive.

Answers

Answer 1
Answer:

Answer:try redoing everything step by step and see if that solves it

Explanation:


Related Questions

What type of result does the MATCH function, when used on its own, return?
Write a program that takes user input describing a playing card in the following short-hand notation:А Ace 2... 10 Card valuesJ Jack Q Queen K King D Diamonds H Hearts S Spades C ClubsYour program should print the full description of the card. For example, Enter the card notation: QS Queen of Spades Implement a class Card whose constructor takes the card notation string and whose getDescription method returns a description of the card. If the notation string is not in the correct format, the getDescription method should return the string "Unknown".
Write the prototype for a function named showSeatingChart that will accept the following two-dimensional array as an argument. const int ROWS = 20; const int COLS = 40; string seatingChart[ROWS][COLS]; Note: The two-dimensional array argument must be a const string array. You must include a second integer argument (scalar, not an array).
Your app needs to store the following information. For each type of information, decide whether you would use an array or a variable to store it:(a) All the messages a user has sent(b) The highest score a user has ever reached on the app(c) A username and password to unlock the app
Should I get hollow knight, hyper light drifter, Celeste, or stardew valley for switch

Imagine that you only used assignment statements for the design of the seven-segment display decoder. How would you obtain the Boolean expressions for the seven segments? What would your VHDL design module code look like? Which way do you prefer designing the seven-segment display decoder, this way or by using the advanced VHDL statements you used in task 1?

Answers

Answer:

Please see the attached file for the complete answer.

Explanation:

Travis and Craig are both standard users on the network. Each user has a folder on the network server that only they can access. Recently, Travis has been able to access Craig's folder.This situation indicates which of the following has occurred?

Answers

C. A misconfiguredaccess control. The fact that Travis is able to access Craig's folder indicates that the access control has been misconfigured, allowing Travis to gain access to datahe is not authorized to view.

Misconfigured Access Control Breach on Network Server

This situation indicates that a misconfigured access control has occurred. It appears that Travis has been granted access to Craig's folder, which he should not have access to. This misconfiguration of the access controlsettings may have been an accidental or intentional action taken by someone with the necessary permissions.

Regardless of the cause, this misconfiguration has enabled Travis to access Craig's data, which is a serious security breach and needs to be addressed immediately. The proper security protocols need to be put in place to ensure that only authorized users can access the necessary data and to prevent any further breaches of security.

Since the question isn't complete, here's the full task:

Travis and Craig are both standard users on the network. Each user has a folder on the network server that only they can access. Recently, Travis has been able to access Craig's folder.

This situation indicates which of the following has occurred?

Choose the right option:

  • A. A data breach
  • B. An intrusion
  • C. A misconfigured access control
  • D. An unauthorized user login

Learn more about Network: brainly.com/question/8118353

#SPJ4

9-1. Assume that an average SNMP response message is 100 bytes long. Assume that a manager sends 400 SNMP Get commands each second. a) What percentage of a 100 Mbps LAN link’s capacity would the resulting response traffic represent? Answer : b) What percentage of a 1 Mbps WAN link would the response messages represent? c) What are the management implications of your answers?

Answers

Answer:

a) 0.32%

b) 32%

c) Mbps WAN link is of more benefit

Explanation:

Average SNMP response message = 100 bytes

Avere message for each second when manager sends 400 SNMP

: 400 SNMP per second * 100 bytes = 40000 bytes per second = 40000Bps

To convert byte to bits, We have 1 byte = 8 bits

Therefore, 40000Bps = 40000 * 8 = 320 Kbps

a) Calculating the percentage of a 100 Mbps LAN link’s capacity

100 Mbps = 100000Kbps

320 Kbps is what percent of 100000Kbps = (320)/(100000) * 100 = 0.32%

So the resulting response traffic would represent 0.32% of a 100 Mbps LAN link’s capacity.

b) Calculating the percentage of a 1Mbps LAN link’s capacity

1Mbps = 1000Kbps

320 Kbps is what percent of 1000Kbps = (320)/(1000) * 100 = 32%

So the resulting response messages would represent 32% of a 1Mbps LAN link’s capacity.

c) When we are using the 1 Mbps WAN link, we use 32% of its speed to response the message as opposed to 100 Mbps LAN link that uses just 0.32%. This means the  1 Mbps WAN link uses more bandwith than the 100 Mbps LAN link. Therefore the management implication is that it is better to use the  1 Mbps WAN link has it has more benefits.

Where does execution resume after an exception has been thrown and caught?

Answers

Answer:

The execution resumes in the finally block if one exists or otherwise from the next statement following the try...catch block.

Explanation:

Once an exception has been thrown and caught in the code, the execution continues with the statements in the finally block if one exists. If there is no finally block defined then execution resumes from the next statement following the try... catch block. For example:

try{

//An exception is raised

}

catch (Exception e){

//Exception is handled

}

System.out.println("After try...catch");

In this code segment, the next statement to be executed after catch is the System.out.println();

Python code 100 Random Numbers (twice)python code

instructions:
You need to write code that will print two bricks of numbers, one with integers, one with decimals.

Answers

import random

i = 1

while i <= 100:

   print("#"+str(i)+": "+str(random.randint(1,100)), end=", ")

   i+=1

print()

i = 1

while i <= 100:

   print("#"+str(i)+": "+str(random.uniform(1,100)), end=", ")

   i += 1

I hope this helps!

For each of the following algorithms medicate their worst-case running time complexity using Big-Oh notation, and give a brief (3-4 sentences each) summary of the worst-case running time analysis. (a) Construction of a heap of size n , where the keys are not known in advance.
(b) Selection-sort on a sequence of size n.
(c) Merge-sort on a sequence of size n.
(d) Radix sort on a sequence of n integer keys, each in the range of[ 0, (n^3) -1]
(e) Find an element in a red-black tree that has n distinct keys.

Answers

Answer:

Answers explained below

Explanation:

(a) Construction of a heap of size n , where the keys are not known in advance.

Worst Case Time complexity - O(n log n)

Two procedures - build heap, heapify

Build_heap takes O(n) time and heapify takes O(log n) time. Every time when an element is inserted into the heap, it calls heapify procedure.

=> O(n log n)

(b) Selection-sort on a sequence of size n.

Worst Case Time complexity - O(n^2)

Selection sort finds smallest element in an array repeatedly. So in every iteration it picks the minimum element by comparing it with the other unsorted elements in the array.

=> O(n^2)

(c) Merge-sort on a sequence of size n.

Worst Case Time complexity - O(n log n)

Merge sort has two parts - divide and conquer. First the array is divided (takes O(1) time) into two halves and recursively each half is sorted (takes O(log n) time). Then both halves are combines (takes O(n) time).

=> O(n log n)

(d) Radix sort on a sequence of n integer keys, each in the range of[ 0 , (n^3) -1]

Worst Case Time complexity - O (n log b (a))

b - base of the number system, a - largest number in that range, n - elements in array

Radix sort is based on the number of digits present in an element of an array A. If it has 'd' digits, then it'll loop d times.

(e) Find an element in a red-black tree that has n distinct keys.

Worst Case Time complexity - O (log n)

Red-black tree is a self-balancing binary tree => The time taken to insert, delete, search an element in this tree will always be with respect to its height.

=> O(log n)