Answer:
- import random
-
- states = {
- "Alabama": "Montgomery",
- "California": "Sacramento",
- "Florida": "Tallahassee",
- "Hawaii": "Honolulu",
- "Indiana": "Indianapolis",
- "Michigan": "Lansing",
- "New York": "Albany",
- "Texas" : "Austin",
- "Utah" : "Salt Lake City",
- "Wisconsin": "Madison"
- }
-
- correct = 0
- wrong = 0
- round = 1
- while(round <= 5):
- current_state = random.choice(list(states))
- answer = input("What is the capital of " + current_state + ": ")
-
- if(answer == states[current_state]):
- correct += 1
- else:
- wrong += 1
-
- round += 1
-
- print("Correct answer: " + str(correct))
- print("Wrong answer: " + str(wrong))
Explanation:
The solution code is written in Python 3.
Line 3 -14
Create a dictionary of US States with capital as each of their corresponding value. Please note only ten sample states are chosen here.
Line 16 - 18
Create variables to track the number of correct and inaccurate response and also round counter.
Line 19 - 28
Set the while condition to enable user to play the quiz for five questions and use random.choice to randomly pick a state from the dictionary and prompt user to input the capital of selected stated.
If the answer matched with the capital value of the selected state, increment the correct counter by one. Otherwise the wrong counter will be incremented by one. Increment the round counter by one before proceed to next round.
Line 30 - 31
Print the number of correct responses and wrong responses.
Answer:
Option C is the correct answer for the above question.
Explanation:
A system flowchart is a picture form of all the processes of the system or software for which this flowchart is designed. It is used for the detailed design of the input, process, and output of the system. The above question asked about the type of flowchart which is used to tell the relationship between output, processing, and input of the system, which is the system flowchart which is described above. Hence the answer is option c while the other is not correct because--
- Option 'a' states about an internal control flowchart, which is not the type of the flowchart.
- Option b states about a document flowchart, which is used to describe the document flow.
- Option d states about a program flowchart, which is used to describe the flow of the program.
Answer:
i personally think its a and c i could be wrong tho.
Explanation:
When someone is unemployed and not making any income for him or herself, or her or his family, a lot of impacts would be felt by them. They would not be able to afford food for themselves, or support their families in any way that requires monetary relief. They would also have problems in paying for medical treatments. Problems with paying rents and mortgages would also be faced by them.
Thus, the best answer to the question would be all of the above.