Write a program that simulates applying a "boost" to a spaceship in a spaceship race game.
A spaceship makes progress by getting a "boost" value between 0 and 10. The boost value
is determined from generating a random number between 0 and 10. Assuming the starting
distance of the spaceship is 0, the program will output the boost value and the total
distance travelled by the spaceship after applying the boost. (Note: Two newlines are output
after the final output of the program).
When a random seed value of 2 is used, the output of the program will look like:
Boost: 6
Distance travelled: 6

Answers

Answer 1

Programming languages can be used to simulate several scenarios; in this case, the "boost"

The simulating program in C++ where comments are used to explain each line is as follows:

#include<iostream>

#include<cstdlib>

#include<ctime>

using namespace std;

int main() {

 // This sets the seed to time(0)

 srand(time(0));

 // This generates a random number between 0 and 10, to represent the boost

 int boost = rand()%10;

 // This prints the required outputs

 cout << "Boost: " << boost;

 cout << "\nDistance travelled: " << boost;

 return 0;

}

Read more about similar programs at:

https://brainly.com/question/16240699


Related Questions

A hybrid data mart ________ data from a data warehouse as well as other data collection systems. It incorporates a top-down approach, end-user inputs, and enterprise-level integration. g

Answers

Answer:

Hybrid Data Marts

A hybrid data mart allows you to combine input from sources other than a data warehouse. This could be useful for many situations, especially when you need ad hoc integration, such as after a new group or product is added to the organization.

We can use a hybrid data mart to mix data from sources other than a data warehouse, and the further discussion can be defined as follows:

Hybrid Data Marts:

It could be useful in a variety of scenarios, particularly when informal integration is required, like when a new group or product is added to the organization.

We can use a hybrid data mart to combine data from various sources other than a data warehouse. It's a structure or access pattern that retrieves client-specific data in data warehouse environments. This data mart is a subset of a data warehouse that is typically focused on a particular business line or functional area.

Therefore, the final answer is "separates".

Find out more about the Hybrid Data Marts here:

brainly.com/question/13989635

How do I open a letter doc in my documents in my documents folder?

Answers

Double click the letter doc, it s hold open automatically

Sergio has been asked to make a set of data that was once restricted now available to any users. What data type will Sergio apply to this set of data

Answers

The data type Sergio will apply to this set of data that was once restricted to become available to all users is: Public.

A database can be defined as a structured or organized collection of data that are stored on a computer system and usually accessed electronically.

A data type refers to the content of both structured and unstructured data while organizing them into categories based on specific criteria, especially for access or usage, easy retrieval, sorting, and storage by users.

In Computer and technology, the three (3) main data type with respect to restrictions on its access or usage are:

PrivateProtectedPublic

A public data is typically made up of variables that are visible and accessible to all classes or users.

In conclusion, Sergio should make the data a public data, in order to make them available to all users.

Read more: https://brainly.com/question/13889633

Brainliest if correct. 3. You are researching ways to boost employee morale for a proposal. How can you
avoid copyright issues when you find materials from outside sources? (1 point)

Answers

To avoid copyright you can give credit to the original author. For example if I copy information that said “all humans are meant to be extinct by 2073” from notarealwebsite.com I shout credit them for this.

What unit on a digital camera gives added illusions

Answers

Vfx used for visual effects in the creation on any screen.. imagery that does not physically exist in life. Vfx also allow makers of films to create environments, objects, creature,ect..

_____ are extremely _____ data structure’s, used all the time, and there are so many _____ that can handle them to do useful things.
A _____ can be thought of as an array of arrays
•versatile
•functions
•arrays
•matrix

Answers

Answer:

arrays are extremely versatile  data structure’s, used all the time, and there are so many functions that can handle them to do useful things.

A matrix can be thought of as an array of arrays

Answer:

Arrays are extremely versatile data structure's, used all the time, and there are so many functions that can handle them to do useful things.

A matrix can be thought of as an array of arrays.

Happy Holidays

Explanation:

write down the application areas of an ICT?​

Answers

Answer:

These are internet, telephone, mobile phone, TV, radio and office automation systems such as word-processing, fax, audio conferencing, video conferencing, computer conferencing, multimedia, etc, through the use of networks of satellite and fiber optics..

Explanation:

hope its help

Which of the following is an example of power redundancy?
UPS
Backup server
RAID
Fault tolerance

Answers

The correct answer is UPS

When a derived class method has the same name as a base class method, it is often said that the derived class method ________ the base class method.

Answers

Answer:

will be

Explanation:

I'm not quite sure but I think that this is the answer for your question

In Python which is the correct method to load a module math?

Answers

Answer: The math module is a standard module in Python and is always available. To use mathematical functions under this module, you have to import the module using import math .

Explanation:

Buddys machine shop has a kiosk computer located in the lobby for customers to use. The kiosk computer has recently been updated to Windows 10 from Windows 7 and is not part of a domain. The local computer policy created for Windows 7 has been applied to Windows 10. This policy severely restricts the use of the computer, so that customers can only use the web browser.
Occasionally, an administrator needs to sign in to the kiosk computer to perform maintenance and update software. However, this is awkward because the administrator needs to disable settings in local policy be performing any task. Then, when the tasks are complete, the administrator needs to re-enable the settings in the local policy. Explain how this system can be improved upon.

Answers

If your PC's are in an Active Directory domain, you can leverage Active Directory Group Policies to deploy the appropriate settings. Be sure to include the below settings in your Group Policy for the user accounts and workstations that will be running as a Kiosk. After creating this Group Policy, you can test by running gpupdate /force and then restarting the PC.

User Configuration
Administrative Templates
Start Menu and Taskbar
Change Start Menu power button (enabled) - set to "Lock" (I know this sounds weird, but Windows 7 won't completely disable Logoff if the Start Menu power button is defaulting to the Logoff action).
Remove Logoff on the Start Menu (enabled)
Remove and prevent access to the Shut Down, Restart, Sleep and Hibernate commands (enabled)
System
Ctrl+Alt+Del Options
Remove Lock Computer (enabled)
Remove Logoff (enabled)
Computer Configuration
Administrative Templates
System
Logon
Hide entry points for Fast User Switching (enabled)
For Windows PCs not in a Domain Environment

If your PC's are not in an Active Directory domain, then you'll need to make the below changes manually at each Kiosk PC. Note that you may be able to automate the changes via the use of operating system imaging tools and local mandatory user profiles - leave a comment below if you have interest in those steps.

Login at each Kiosk PC using a user account that will ultimately be used to run the Kiosk desktop applications.
Launch the Windows Registry Editor (REGEDIT.EXE) and make the following changes to the registry (note that you may need to temporarily grant local Administrative access to your Kiosk user account to do this if it is already in a very locked down state)
HKEY_CURRENT_USER
SOFTWARE
Microsoft
Windows
CurrentVersion
Policies
Explorer

RAM or RIM is correct?

Answers

RAM is the correct answer

Which of the following will you do in step X in the following series of clicks to change the bounds of
a chart axis: Chart > Chart Tools > Format tab > Current Selection> Format Selection > Format Axis
> Axis Options > Vertical Axis crosses > At Category number > X?
O Expand Labels, then under Interval between labels, select Specify interval unit and type the
number you want in the text box.
O Expand Tick Marks, and then in the Interval between tick marks box, and type the number that
you want
N
Type the number that you want in the text box.
O Expand Tick Marks, and then select the options that you want in the Major type and Minor type
boxes.

Answers

In order to change the bounds of  a chart axis after performing the aforementioned series of clicks, at step X: C. Type the number that you want in the text box.

A step chart can be defined as a line chart that uses both the vertical and horizontal lines to connect two (2) data points. Thus, it enables an end user to see the exact point on the X-axis when there is a change in the Y-axis.

In Microsoft Excel, the series of clicks that are used to change the bounds of  a chart axis are:

Click on chart.Select chart tools and then format tab.Select the current selection and then format selection.Click on format axis and then axis options.Click on vertical axis crosses.At category number, you should type the number that you want in the text box.

In conclusion, typing the number that you want in the text box is the action that should be performed at step X.

Read more on step chart here: https://brainly.com/question/9737411

Filtering is a function of _____.

Answers

The answer is: switches.

Explanation:

Filtering is a function of switches.

What is property in educational technology

Answers

1. It is based on scientific and technological advancements.
2. It is more a practical discipline and less a theoretical one.
3. It is a fast growing modern discipline.
4. It makes use of the research findings of psychology, sociology, engineering, sciences and social psychology etc., and applies the same to the field of education.
5. It brings pupils, teachers and technical means together in an effective way.
6. It is the science of techniques and methods. It locates the problems in the field of education, remedies them and ultimately aims at improving the education system.
7. It is bound to improve the teacher, the learner and the teaching learning process.

displaying advertisements specific or users internet based on their buy preference is called ._________.​

Answers

Targeted advertising       hope it helps

1. Import it into Eclipse. Open the file in Eclipse 2. Edit the file to add comments to identify the instance variables, constructors headings and method headings 3. Edit the file to build and add the UML in the Header comment of the code. You must do a very thorough job and be sure to pay attention to the details. 4. Save your Flower.java file. 5. Upload your updated Flower.java file here.package during_class_session;public class Flower{private String NameofFlower;private double PriceofFlower;public Flower() {this.setNameofFlower("No name yet");this.setPriceofFlower(0.0);}public Flower(String nameofFlower_initial, double priceofFlower_initial) {this.setNameofFlower(nameofFlower_initial);this.setPriceofFlower(priceofFlower_initial);}public String getNameofFlower() {return NameofFlower;}public void setNameofFlower(String nameofFlower) {NameofFlower = nameofFlower;}public double getPriceofFlower() {return PriceofFlower;}public void setPriceofFlower(double priceofFlower) {PriceofFlower = priceofFlower;}}

Answers

Answer:

/

Explanation:

in which country was Abacus build
if ur smart don't searh​

Answers

Answer:

Abacus many be built first in China

Explanation:

I know Abacus ^o^

Answer:

Hewo There!!!!

__________________

China- i thinkkk maybe?

__________________

“Hold fast to dreams,

For if dreams die

Life is a broken-winged bird,

That cannot fly.”

― Langston Hughes

__________________

Think of life as a mytery because well it sort of is! You don't know what may happen may be good or bad but be a little curious and get ready for whatever comes your way!! ~Ashlynn

Professor Gekko has always dreamed of inline skating across North Dakota. He plans to cross the state on highway U.S. 2, which runs from Grand Forks, on the eastern border with Minnesota, to Williston, near the western border with Montana. The professor can carry two liters of water, and he can skate m miles before running out of water. (Because North Dakota is relatively flat, the professor does not have to worry about drinking water at a greater rate on uphill sections than on flat or downhill sections.) The professor will start in Grand Forks with two full liters of water. His official North Dakota state map shows all the places along U.S. 2 at which he can refill his water and the distances between these locations. The professor’s goal is to minimize the number of water stops along his route across the state.

a. Give an efficient algorithm by which he can determine which water stops he should make.

b. Prove that your strategy yields an optimal solution, and give its

Answers

The efficient algorithm by which he can determine which water stops he should make; has been determined below and the strategy which is the greedy strategy has been proven to yield an optimal solution.

To solve this question optimally, we will make use of the greedy solution.

In this method, we will maximize the distance that can be covered from a particular point in such a way that there must be a place where water can be gotten before a run out is experienced.

Now, the first point at which there will be a stop should be located at a point that is farthest from the starting position and is also made to be ≤ m miles from the starting position.

Now, this this situation is one that shows optimal substructure and since our  first stopping point will be made to be at p, it means that we are solving the sub-question with the assumption that our starting point is at p.

When we combine the two stated plans above, we will arrive at an optimal solution for the normal reasons via cut and paste.

B) Now we need to show that the greedy approach earlier used produce a first stopping point which is contained in the optimal solution.

Let O represent any optimal solution whereby the professor stops at positions o₁, o₂, o₃....oₙ.

Let h₁ represent the farthest stopping point that is reachable from the starting point. Then we can replace o₁ by h₂ to generate a modified solution H since o₁ - o₂ < o₂ - h₁.

Finally, we can really make it to the positions in H without having to run out of water and since H has the same number of stops, we can conclude that h₁   is contained in one of optimal solution.

Therefore our strategy which is the greedy strategy has been proven to work.

Read more about algorithms at; https://brainly.com/question/24793921

Add comma(s) where needed, if needed.


My birthday October 31 2005 is on Halloween.


My birthday October 31 2005 is on Halloween. (no change)


My birthday October 31, 2005, is on Halloween.


My birthday October 31, 2005 is on Halloween.


My birthday, October 31, 2005, is on Halloween.

Answers

Answer:

My birthday, October 31, 2005, is on Halloween.

Explanation:

The correct option with commas is "My birthday, October 31, 2005, is on Halloween."

Why is this correct?

The revised sentence "My birthday, October 31, 2005, is on Halloween." correctly uses commas to separate the date from the year and to set off the date as an appositive.

This improves clarity and follows proper punctuation rules.

Hence,. The correct option with commas is "My birthday, October 31, 2005, is on Halloween."

Read more about commas here:

https://brainly.com/question/2142088

#SPJ2

state the base of correct addition of 27 + 6 =34​

Answers

Answer:

9

Explanation:

lets do calculations with ONLY the rightmost digits, ie., 7 + 6 = 4, so we're ignoring the carry.

Then, following must be true as well:

7+5 = 3

7+4 = 2

7+3 = 1

7+2 = 0 <= this reveals our base 9

7+1 = 8

7+0 = 7

how to count binary ? Help Better understand this question

Answers

Explanation:

For each row in the picture, you have to switch on some of the bits to create the number on the left.

Each bit has a value, a "weight" so to speak. By switching on the bit, you add that weight to the sum.

These "weights" are shown at the top row.

So to create 4, it's easy, you just switch on the '4' bit.

Same for 128, only one bit has to be switched on.

40 is a bit more involved, now you have to switch on 32 and 8, since 32+8 is 40.

For every number, there is exactly one combination of switched on bits to create that number. In the case of 40, the binary representation is:

00101000.

What type of control system has the ability to measure the controlled variable and the system output and dynamically adjust the setpoint to achieve more precise control

Answers

Proportional integral derivative (PID) control can measure the controlled variable and the system output and dynamically adjust the setpoint to achieve more precise control. It is an algorithm used in the industry.

An algorithm can be defined as a well-established list of rules/steps to follow to solve a given problem.

Proportional integral derivative (PID) control is the most widely used algorithm used in industry.

This type of control (PID) has different coefficients, i.e., proportional, integral and derivative coefficients, which vary in order to obtain an optimal response.

Learn more about proportional integral derivative control here:

https://brainly.com/question/20164864

Henry is creating code In JavaScript to run calculations on extremely small numbers. How can he use MIN_VALUE as validation in the program?
OA. it can check the lowest value of a statement
ОВ. It can check the minimum value from a group
O C. it can check the lowest value JavaScript can handle
OD. it can check the lowest index value

Answers

In creating code in JavaScript to run calculations on extremely small numbers, MIN_VALUE as validation in the program can be use to check the lowest value JavaScript can handle

Number.MIN_VALUE returns the smallest positive numeric value representable in JavaScript.  It is the number more closer to zero. The value is approximately 5e⁻³²⁴.

Using Number.MIN_VALUE, the value can be printed as follows:

val = Number.MIN_VALUE;

console.log(val); // 5e-324

Therefore, In creating code in JavaScript to run calculations on extremely small numbers, MIN_VALUE as validation in the program can be use to check the lowest value JavaScript can handle.

learn more on JavaScript here: https://brainly.com/question/13041378?referrer=searchResults

What does it mean "Be Proactive"?

Answers

Answer:controlling a situation by making things happen or by preparing for possible future problems

Explanation:

Make things happen instead of waiting for them

how to set brainlyest

Answers

Yeah he or she is right

in excel If you have a lengthy text, adding a __________ can change the cell’s format to ________. *

Answers

Based on Microsoft Excel analysis, in excel If you have a lengthy text, adding a Wrap Text can change the cell’s format to high height.

What is Microsoft Excel?

Microsoft Excel is one of the software applications in Microsoft Office. It has cells of rows and columns in which users can easily put facts and figures to carry out tasks.

The function of Wrap Text

Wrap Text is applied in Microsoft Excel to show the cell contents on many lines instead of a single long line.

Hence, in this case, it is concluded that the correct answer is "Wrap Text and High Height."

Learn more about Microsoft Excel here: https://brainly.com/question/24749457

Read two numbers from user input. Then, print the sum of those numbers.
Hint -- Copy/paste the following code, then just type code where the question marks are to finish the code.
num1 = int(input())
num2 = ?
print(num1 + ?)

Answers

Answer:

First ? - int(input())

Second ? - num2

Explanation:

This works because we are just mimicing the first input in your first variable.

The second one is adding them together.

Don't remember to give me brainliest :)

What type of databases is not limited by the data’s physical location?

Answers

A distributed database is not limited by the data's physical location.

You decided to test a potential malware application by sandboxing. However, you want to ensure that if the application is infected, it will not affect the host operating system. What should you do to ensure that the host OS is protected

Answers

Considering the situation described here, the thing to do to ensure that the host OS is protected is to install a virtual machine.

What is a virtual machine?

Virtual Machine is the virtualization of a computer system. The purpose of a Virtual Machine is to deliver the functionality of a physical computer containing the execution of hardware and software.

How Virtual Machine is used to ensure that the host OS is protected

Virtual Machine is used to host the virtual environment and subsequently run the operating system within the virtual machine.

This process allows the sandbox to be isolated from the physical hardware while accessing the installed operating system.

Hence, in this case, it is concluded that the correct answer is to install a virtual machine.

Learn more about Virtual Machine here: https://brainly.com/question/24865302

Other Questions
PLEASE HELP ME I WILL GIVE A BRAINLIST Can I get a simple answer Choose the inequality that correctly represents the following sentence:6 less than a number is at most 9. Gary weighed 187 pounds after graduatinghigh school. 5 years later he weighs 228pounds. By what percentage has his weightchanged?Plz helppppppp A provisional license holder under 18 may not drive without special permission _____________________ .A between 8:00 a.m. and 9:00 pmB between 12:00 am and 5:00 amC between 5:01 am and 11:59 pmD between 6:00 a.m. and 6:00 pm Rama de la biologa que estudia la estructura de los organismos the 1920s witnessed racial tension unrest and race riots across american cities. how was this social climate of the 1920s reflected in florida history during this time? A particle moves along the curve y = 4x2 + 1 in such a way that the x value is increasing at the rate of 2 units per second. At what rate is y changing when x = 1?. Point Q is plotted on the coordinate grid. Point P is at (20, 30). Point R is vertically above point Q. It is at the same distance from point Q as point P is from point Q. Which of these shows the coordinates of point R and its distance from point Q?"On a coordinate grid from negative 50 to positive 50 in increments of 10, Point Q is plotted at the ordered pair negative 40, negative 30."/>On a coordinate grid from negative 50 to positive 50 in increments of 10, Point Q is plotted at the ordered pair negative 40, negative 30. Point R is at (40, 30), a distance of 60 units from point Q Point R is at (40, 10), a distance of 20 units from point Q Point R is at (40, 30), a distance of 60 units from point Q Point R is at (40, 10), a distance of 20 units from point Q please helpTwo masses m1 and m2, are a distance R apart and mq exerts a gravitational force F on m2. What is the gravitational force is the gravitational force on M1? According to Labor Value Theory, diamonds are more valuable than water because...Group of answer choicesthey are more common.they are more difficult and require more resources to bring them to market.a diamonds first use is more essential than the first use of water.they last longer and can be used over and over again. Which individual has had the greatest influence in our understanding of the way people confront death Whats the correct answer to this problem? The 11th term of the AP -3, -1/2, 2 . .... is What is the ratio of 1/2 to 6?(A) 12(B) 3(C)1/3(D)1/6 (E) 1/12 write of the following does not represent electrical power in a circuit ? (a) IR (b) IR(c)VI (d) V/R The figure shows triangle DEF and line segment BC, which is parallel to EF:Triangle DEF has a point B on side DE and point C on side DF. The line BC is parallel to the line EF.Part A: Is triangle DEF similar to triangle DBC? Explain using what you know about triangle similarity. (5 points)Part B: Which line segment on triangle DBC corresponds to line segment EF? Explain your answer. (3 points)Part C: Which angle on triangle DBC corresponds to angle F? Explain your answer. (2 point Does the coefficient of kinetic friction depend on the speed? A balanced scale has 3 marbles, 2 pennies, and 4 quarters on one side and 4 marbles, 2quarters, and 1 penny on the other side. If pennies weigh one gram and quarters weigh3 grams, find the weight of a marble. Explain or show your reasoning. Why did Nene fail in her efforts to persuade Nnaemeka? What did she fail to acknowledge?