Oh hey lol yea yea lol I got the money back to me put on the phone so you know
Answer:
Explanation:
The following code is written in Java. It is hard to fully create the code without the rest of the needed code including the T class and the Measurable interface. Regardless the following code can be implemented if you have that code available.
public static T minmax(ArrayList<T> mylist) {
T min = new T();
T max = new T();
for (int x = 0; x < mylist.size(); x++) {
if (mylist.get(x) > max) {
max = mylist.get(x);
} else if (mylist.get(x) < min) {
min = mylist.get(x);
}
}
return (min, max);
}
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