Which has the highest percent mass of Cl?
| C2Cl6 |
| C2Cl4 |
| CCl4 |
| C2Cl2 |
In: Chemistry
Which of the following has the highest ionization energy?
|
Mn |
||
|
F |
||
|
Ne |
||
|
Cs |
In: Chemistry
In: Economics
Which implementation strategy generally displays the highest evidence of effectiveness in health care?
In: Nursing
In a bimodal histogram, the two highest bars will have the same height.
True or False
In: Statistics and Probability
CSIS 113A C++ Programming Level1
Rock, Paper, Scissors
Introduction
In this assignment you will create a program that will simulate the popular children’s game “Rock, Paper, Scissors”; using only Boolean logic and practice using the for-loop and logical operators as well as continue getting used to data of various types.
Skills: string input/output, data types, logical operators, and control structures
Rock-Paper-Scissors
Rock-Paper-Scissors is a game where two players, on the count of 3, show the rock/paper/scissors symbol with their hand. Rock smashes scissors, scissors cuts paper, and paper covers rock:
Once both players have played valid gestures, there are two ways to determine the winner: one using string comparison and Boolean logic and the other using modular arithmetic; you’ll write a solution using both approaches. For this assignment, only “rock”, “paper”, and “scissors” are considered valid gestures.
Definitions:
1. Valid game: a game in which both players select a valid gesture
2. Invalid game: a game in which a player selects a gesture that is not “rock”, “paper”, or “scissors”. (HINT: DeMorgan’s law will help negation of valid game)
main.cpp
Your program should use a for-loop to play 7 consecutive games (must be a variable) of Rock-PaperScissors determining the winner using only the four decision statements. For each game, your program should:
1) Prompt Player 1 for their selection. The inputs for each game are given below. a. If Player 1 enters an invalid selection you should update the count of invalid games and then begin a new game.
2) Prompt Player 2 for their selection. The inputs for each game are given below.
a) If Player 2 enters an invalid selection you should update the count of invalid games and then begin a new game.
3) If both players have selected a valid gesture determine the winner using string comparison and if/else logic.
4) For each valid game completed, update the count of the number of wins by Player 1, the number of wins by Player 2, or the number of ties as needed.
Test input:
• Game 1: Player one plays “scissors” and Player 2 plays “paper”
• Game 2: Player 1 plays “paper” and Player 2 plays “papers”
• Game 3: Player 1 plays “rock” and Player 2 plays “rock”
• Game 4: Player 1 plays “rocks”
• Game 5: Player 1 play “paper” and Player 2 plays “scissors”
• Game 6: Player 1 plays” scissors” and Player 2 plays “rock”
• Game 7: “Player 1 plays “paper” and Player 2 plays “rock”
Test Run: Your code should look exactly like the one below
Player 1 Enter Selection: scissors
Player 2 Enter Selection: paper
Player 1 Enter Selection: paper
Player 2 Enter Selection: papers
Player 1 Enter Selection: rock
Player 2 Enter Selection: rock
Player 1 Enter Selection: rocks
Player 1 Enter Selection: paper
Player 2 Enter Selection: scissors
Player 1 Enter Selection: scissors
Player 2 Enter Selection: rock
Player 1 Enter Selection: paper
Player 2Enter Selection: rock
=============================
Games Won
=============================
Player 1: 2
Player 2: 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tie Games : 1
Invalid Games : 2
=============================
struct Player{
String gesture;
int wins{};
};
int main() {
// TODO: (1) declare constant for the number of games to play
// TOOO: (2) declare and initailize your other counters here (number of ties, invalid games)
Player player_1;
Player player_2;
// TODO: (12) wrap in for-loop once working for 1 game.
// TODO: (3) get user input for player 1, commented out correct code for now, simulating with rock first
player_1.gesture = "rock";
// cout << "Player 1 enter selection: ";
// getlline(cin, player_1.gesture);
// TODO: (5) write a boolean proposition here, finish what it should be, notice how the name reads
bool gesture_is_rock;
bool gesture_is_paper;
bool gesture_is_scissors;
bool is_valid_gesture;
// TDOO: (6) determine if player 1 entered invalid move
if (!is_valid_gesture) {
// TODO: (7) what should be done if invalid? How do you continue the loop
}
// TODO: (8) Do the exact same for Player 2 reusing the boolean variables
// TODO: (9) Determine if there was a tie, otherwise, there was a win
bool is_tied_game;
if (is_tied_game) {
// TODO: (10) what should be done if tie?
}
else {
// TODO: (11) consider how player one can win:
bool player_1_wins;
if (player_1_wins) {
}
else {
}
}
// TODO: (4) Setup the way the output should be displayed based on the document
return 0;
}In: Computer Science
Given a normal distribution, answer the following.
(a) What z-score forms the boundary between the highest 15% and the rest of the scores? z =
(b) What z-score forms the boundary between the highest 40% and the rest of the scores? z =
(c) What z-score forms the boundary between the lowest 20% and the rest of the scores? z =
(c) What z-score forms the boundary between the lowest 10% and the rest of the scores? z =
In: Statistics and Probability
The monthly returns for a financial advisory service can be modeled by a Normal distribution with a mean of $145 and standard deviation of $79, per $10,000 invested. Find the following boundaries: (use 5 decimals for all answers) PLEASE SHOW ALL WORK AND CALCULATIONS PLEASE AND THANK YOU
1. the highest 20% of monthly returns is _____
2. the lowest 20% of monthly returns is ______
3. the highest 10% of monthly returns is _______
4. the middle 20% of monthly returns. is ______ and ______
In: Statistics and Probability
An electric stove burner on its highest setting exhibits an orange glow.
A) When the burner setting is changed to low, the burner continues to produce heat but the orange glow disappears. How can this observation be explained with reference to one of the fundamental observations that led to the notion of the quanta?
B) Suppose that the energy provided to the burner could be increased beyond the highest setting of the stove. What would we expect to observe with regard to visible light emitted by the burner?
In: Chemistry
Based on the model N(1156,85) describing steer weights, what are the cutoff values for
a) the highest 10% of the weights?
b) the lowest 20% of the weights?
c) the middle 40% of the weights?
a) The cutoff weight for the highest 10% of the steer weights is __lbs.
(Round to one decimal place as needed.)
b) The cutoff weight for the lowest 20% of the steer weights is __lbs
(Round to one decimal place as needed.)
c) The cutoff for the middle 40% of the steer weights are __ and __obs
In: Statistics and Probability