answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
katrin2010 [14]
1 year ago
12

In a certain game, a player may have the opportunity to attempt a bonus round to earn extra points. In a typical game, a player

is given 1 to 4 bonus round attempts. For each attempt, the player typically earns the extra points 70% of the time and does not earn the extra points 30% of the time. The following code segment can be used to simulate the bonus round.
success - 0
attempts - RANDOM 1, 4
REPEAT attempts TIMES
IF (RANDOM 110 s 7
success - success + 1
DISPLAY "The player had"
DISPLAY attempts
DISPLAY "bonus round attempts and"
DISPLAY success
DISPLAY "of them earned extra points."
Which of the following is not a possible output of this simulation?
А. The player had 1 bonus round attempts and 1 of them earned extra points.
B The player had 2 bonus round attempts and of them earned extra points.
С The player had 3 bonus round attempts and 7 of them earned extra points.
D The player had 4 bonus round attempts and 3 of them earned extra points.
Computers and Technology
1 answer:
Assoli18 [71]1 year ago
8 0

Answer:

С The player had 3 bonus round attempts and 7 of them earned extra points.

Explanation:

Given

See attachment for correct code segment

Required

Which of the options is not possible?

From the question, we understand that:

attempts \to [1,4] --- attempt can only assume values 1, 2, 3 and 4

The following "if statement" is repeated three times

<em>IF RANDOM[1,10] <= 7:</em>

<em>    success = success + 1</em>

This implies that the maximum value of the success variable is 3

The first printed value is the attempt variable

The second printed value is the success variable.

From the list of given options, (a), (b) and (d) are within the correct range of the two variable.

While (c) is out of range because the value printed for variable success is 7 (and 7 is greater than the expected maximum of 3)

You might be interested in
Write a while loop that prints usernum divided by 2 until user_num is less than 1. The value of user_num changes inside of the l
zaharov [31]

Answer:

The program to this question can be describes as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

float user_num ;//defining float variable

cout<<"Enter any number: "; //message

cin>>user_num; //input value from the user

while (user_num >= 1) //defining loop to calculate value

{

user_num =user_num/ 2; //diving the value

cout<<user_num<<endl; //print value

}

return 0;

}

Output:

Enter any number: 20

10

5

2.5

1.25

0.625

Explanation:

In the above program, a float variable user_num is declared in which we store input value from the user end, in the next step, a while loop is declared, which calculates, the given value.

  • In the loop a condition is defined, that user_num value is greater than equal to 1, inside the loop it will divide the value of the user_num and store in this variable.
  • In this print, the method is used, which prints its variable values.
5 0
2 years ago
What are the possible consequences if you fail to identify system requirements correctly and completely?
AlladinOne [14]
There are a few consequences for failing to identify system requirements. 

1. Strain on time and effort which can cost money for either a company or yourself (depending if you are an employer, employee, etc).

2. Additional costs for hardware. If you decide to upgrade your hardware on a later time. It will cost additional money for repairs and replacements to adjust.

3. It can cause dissatisfaction to a user if you are working as a technician (for example) which can leave a negative mark on your reputation/resume) 
4 0
2 years ago
Strlen("seven"); what is the output?
Leokris [45]

Answer:

A is your answer hope this helps

4 0
2 years ago
Given two integers as user inputs that represent the number of drinks to buy and the number of bottles to restock, create a Vend
ivann1987 [24]

Answer:

In C++:

#include <iostream>

using namespace std;

class VendingMachine {

 public:

   int initial = 20;};

int main() {

 VendingMachine myMachine;

   int purchase, restock;

   cout<<"Purchase: ";  cin>>purchase;

   cout<<"Restock: ";  cin>>restock;

   myMachine.initial-=(purchase-restock);

   cout << "Inventory: "<<myMachine.initial<<" bottles";  

   return 0;}

Explanation:

This question is incomplete, as the original source file is not given; so, I write another from scratch.

This creates the VendingMachine class

class VendingMachine {

This represents the access specifier

 public:

This initializes the inventory to 20

   int initial = 20;};

The main begins here

int main() {

This creates the object of the VendingMachine class

 VendingMachine myMachine;

This declares the purchase and the restock

   int purchase, restock;

This gets input for purchase

   cout<<"Purchase: ";  cin>>purchase;

This gets input for restock

   cout<<"Restock: ";  cin>>restock;

This calculates the new inventory

   myMachine.initial-=(purchase-restock);

This prints the new inventory

   cout << "Inventory: "<<myMachine.initial<<" bottles";  

   return 0;}

8 0
2 years ago
Which among the following enhances WS-Security to facilitate a mechanism for issuing, renewing, and validating security tokens?
Aleksandr-060686 [28]

Answer:

a. WS-Trust

Explanation:

WS-Trust can be defined as a WS-specification as well as OASIS standard that help to provides extensions to WS-Security, in order to facilitate a mechanism for issuing, renewing, as well as validating of security tokens which is why the aim and objectives of WS-Trust is to help and enable applications to construct trusted SOAP message exchanges.

Nevertheless WS-Trust enables the issuance as well as the dissemination of credentials within several and various trust domains.

5 0
2 years ago
Other questions:
  • Which statement regarding dialogues in multiplayer games is true? Dialogues are based only on players’ actions.
    7·2 answers
  • Which are examples of intrapersonal goals? Check all that apply. Lea plans to finish her next project before the due date. Erick
    12·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    11·1 answer
  • The spreadsheet below shows the names years in office, and number of terms for five US presidents
    7·2 answers
  • Discuss the importance of following a well-integrated change control process on IT projects. What consequences can result from n
    14·1 answer
  • Ken Olson, president of Digital Equipment Corp. in the late 1970's, Thomas J. Watson, chairman of IBM in the early 1940's, and T
    6·1 answer
  • Python
    9·1 answer
  • 1. Used ____________ must be hot drained for 12 hours or crushed before disposal.
    15·1 answer
  • The Coins class was created to hold all your loose change, kind of like a piggy bank! For this exercise, you are going to simula
    15·1 answer
  • Given positive integer n, write a for loop that outputs the even numbers from n down to 0. If n is odd, start with the next lowe
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!