![anthonyalvar6636](/avatars/17411.jpg)
anthonyalvar6636
07.04.2020 •
Computers and Technology
Write a program that creates a dictionary containing the U.S. states as keys and their capitals as values. (Use the Internet to get a list of the states and their capitals.) The program should then randomly quiz the user by displaying the name of a state and asking the user to enter that state’s capital. The program should keep a count of the number of correct and incorrect responses. (As an alternative to the U.S. states, the program can use the names of countries and their capitals.)
Solved
Show answers
More tips
- C Computers and Internet IMHO: What is it, why is it important, and how to use it?...
- H Health and Medicine How to Calculate Your Ideal Weight?...
- S Style and Beauty Discover the Art of Nail Design: How Do You Paint Your Nails?...
- P Philosophy How to Develop Extrasensory Abilities?...
- O Other Everything You Need to Know About Kudyabliks...
- C Computers and Internet The Twitter Phenomenon: What it is and How to Use it...
- C Computers and Internet How to Choose a Laptop: Expert Guide and Tips...
- C Computers and Internet How to Choose a Monitor?...
- H Horoscopes, Magic, Divination Where Did Tarot Cards Come From?...
- S Style and Beauty How to Make Your Lips Fuller? Ideas and Tips for Beautiful Lips...
Answers on questions: Computers and Technology
- C Computers and Technology Read these sentences from the passage: “The TV and the glasses work together. When the TV flashes the image meant for the right eye, the right lens is clear and the...
- C Computers and Technology Consider the following actions which might be performed by a developer when creating a new piece of software to solve a problem. 1. Thoroughly testing code with a...
- A Arts Pythagoras conducted his acoustical experiments after hearing. and intervals coming from a blacksmith shop. o a loud and soft b. consonant and dissonant o o c. large...
- M Mathematics What is the rate of change of the line relationship modeled in the table ?...
- E English Whitch line from the poem “the lake of disney swamp” by thomas moore is best example of imagery...
- M Mathematics In the figure, a | band m 6 = 146º. what is the mz2? enter your answer in the box next...
- B Biology Mutations are important to the evolution of a species because they...
- C Computers and Technology What type of switch can have vlans set up on it? gigabit managed trunk unmanaged...
- E English For each of the following questions. 5. 1. which of the following best describes the protagonist s mood throughout the first marking period?...
- E English Write 4-5 sentences. if your life was being made into a movie, what are 3 songs that you would include on the soundtrack? why?...
Ответ:
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.
Ответ:
10.8109 amu
Step-by-step explanation:
The average atomic mass of boron is determined as the average of the atomic masses of both isotopes weighed by their respective abundances.
Therefore, the average atomic mass is given by:
The average atomic mass of boron isotopes is 10.8109 amu.