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:
the homepage bounce rate
Explanation:
Bounce rate is defined as the percentage of people that visits a page on a website and then exit or leave. That is, the visitors did not view any other page except the first one and they just leave the page after that visit. In order to get the bounce rate, the total number of visitors to a single page is taken and its then divided by the total number of visits to the website. For example, if the total number of visitors to a website over a period of time is 3000, while those that only visited a page on the website is 500, then the bounce rate is
(500/3000) * 100 = 16%
For this question, the homepage recorded 100 visited only once out of 200 which means homepage bounce rate is 50% : (100/200)*100
While website bounce rate is total number of bounces across the website/total visit to the website
100+100 =200 this is the total bounces across the website
200/500 :500 is the total visit to the website
(200/500)*100 = 40 %
Therefore the homepage bounce rate is higher than the site bounce rate
The parts of the presentation that he should design first is Slide master
Slide master is a slide that enables you to do the following:
•Modify your presentation to suit your taste
•It enables you to make a partial or minor change on the slide layout of your presentation
•Slide master help you to create a perfect and special presentation.
•With Slide master you can easily modify your slide text color.
Inconclusion The parts of the presentation that he should design first is Slide master.
Learn more about Slide master here:
brainly.com/question/12600334
Answer:
a) 6
b) 11
c) 11
Explanation:
Given
Prime value q =n= 19
primitive root (a) =10
Alice secret key = 4
Bob secret key = 6
a) The value Alice Sends to Bob
aPrivate key of Alice mod n
= 10^4 mod 19
= 10000 mod 19
=6
b)The value Bob sends to Alice
aPrivate key of Bob mod n
= a3 mod n
= 10^6 mod 19
=1000000 mod 19
= 11
c)
Both the parties calculate the value of secret key at their respective side.
secret key obtained by Alice
= 11
secret key obtained by Bob
= 11
Finally, both the parties obtain the same value of secret key.
The value of common secret key = 17