Explanation:
where are the choices
Write a program in c++ that plays a number guessing game with a Human user. The Human user will think of a number between 1 and 100, inclusive. The program will make guesses and the user will tell the program to guess higher or lower. A sample run of the program might look like this: Ready to play (y/n)? y Think of a number between 1 and 100. My guess is 50. Enter 'l' if your number is lower, 'h' if it is higher, 'c' if it is correct: h My guess is 75. Enter 'l' if your number is lower, 'h' if it is higher, 'c' if it is correct: h My guess is 88. Enter 'l' if your number is lower, 'h' if it is higher, 'c' if it is correct: l My guess is 81. Enter 'l' if your number is lower, 'h' if it is higher, 'c' if it is correct: c Great! Do you want to play again (y/n)? y Think of a number between 1 and 100. My guess is 50. Enter 'l' if your number is lower, 'h' if it is higher, 'c' if it is correct: l My guess is 25. Enter 'l' if your number is lower, 'h' if it is higher, 'c' if it is correct: h My guess is 37. Enter 'l' if your number is lower, 'h' if it is higher, 'c' if it is correct: c Great! Do you want to play again (y/n)? n The strategy that the program will use goes like this: Every time the program makes a guess it should guess the midpoint of the remaining possible values. Consider the first example above, in which the user has chosen the number 81: On the first guess, the possible values are 1 to 100. The midpoint is 50. The user responds by saying "higher" On the second guess the possible values are 51 to 100. The midpoint is 75. The user responds by saying "higher" On the third guess the possible values are 76 to 100. The midpoint is 88. The user responds by saying "lower" On the fourth guess the possible values are 76 to 87. The midpoint is 81. The user responds "correct" Additional Requirements The purpose of the assignment is to practice writing functions. Although it would be possible to write the entire program in the main function, your solution should be heavily structured. Most of the point penalties given on this assignment will be for not following the instructions below carefully. The main function must look exactly like this. Copy and paste this code into your file, and don't edit it: int main() { char response; cout > response; while (response == 'y') { playOneGame(); cout > response; } } The playOneGame() function should implement a complete guessing game on the range of 1 to 100. The lower and upper bounds of the range should be assigned to global named constants and then not used again in your code. In addition, you should implement the following helper functions to be invoked inside your playOneGame() function: void getUserResponseToGuess(int guess, char& result) The getUserResponseToGuess() function should prompt the user to enter 'h', 'l', or 'c' (as shown in the sample output). It should set its "result" parameter equal to whatever the user enters in response. It should do this ONE time, and should not do anything else. Note that printing the guess is part of the prompt. int getMidpoint(int low, int high) The getMidpoint() function should accept two integers, and it should return the midpoint of the two integers. If there are two values in the middle of the range then you should consistently chose the smaller of the two.
Answer:
the question is too long. dear
.mate
List three things you would do if you were not forced to work.
Answer:
i would play with my friends and fish and watch movies
Explanation:
The product of joint force development is a _____________.
Answer:
trained and capable joint force.
Explanation:
The joint force development policy is in regards to the training and recruitment of military officials, to improve or promote the growth and speedy development of recruits in the United States military.
Several aspects of military training are given to officials by joint parties from different but collaborating organizations. Joint education, deployment, and dissemination of employment various members of the armed forces are encouraged.
Can you give an example of mail merge (letter) pls
Answer:
yes a mail merge letter is almost the same as a mail you write to someone but slightly different here is an example
Explanation:
Dear Spiderman
We have the following address on file for you
spiderman
A customer in a store is purchasing five items. The prices of the five items are Price of item 1 = $15.95 Price of item 2 = $24.95 Price of item 3 = $6.95 Price of item 4 = $12.95 Price of item 5 = $3.95 Write a program that holds the prices of the five items in five variables. Display each item’s price, the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 7%
Answer:
Follows are the code to this question:
#include<iostream>//defining a header file
using namespace std;
int main ()//defining a main method
{
float SubTotal,SalesTax,Total;//defining float variable for calculate the value
float item_1 = 15.95, item_2 = 24.95,item_3 = 6.95, item_4 = 12.95,item_5 = 3.95;//defining float variable and assign value
SubTotal = item_1+item_2+item_3+item_4+item_5;//use SubTotal to calculate the sum
SalesTax = SubTotal * 0.07;//use SalesTax to calculate 7% of SubTotal
Total = SubTotal + SalesTax ;//use Total to addd SubTotal and SalesTax
cout << "Price of item 1 : $"<< item_1 << endl;//print item_1 Price
cout << "Price of item 2 : $"<< item_2 <<endl;//print item_2 Price
cout << "Price of item 3 : $"<< item_3 <<endl;//print item_3 Price
cout << "Price of item 4 : $"<< item_4 <<endl;//print item_4 Price
cout << "Price of item 5 : $"<< item_5 <<endl;//print item_5 Price
cout <<"The SubTotal value is: $"<< SubTotal << endl;//print SubTotal value
cout <<"The SalesTax value is: $"<< SalesTax << endl;//print SalesTax value
cout << "The Total value is: $" << Total << endl;//print Total value
return 0;
}
output:
please find attached file.
Explanation:
In the above-given code, three float variable that are "SubTotal, SalesTax, and Total" is define for calculating and store its value, and in the next line, another five float variable " item_1, item_2, item_3, item_4, and item_5" is declared that stores a float value which is defined in the question.
In the next line, the "SubTotal" variable is used to add the value of all items, and in the next line, the SalesTax is used to calculate the 7% of SubTotal and store its value. At the last, the "Total" variable is defined that adds the "SubTotal and SalesTax" value and uses the print method to print all variable values.Command-based operating systems include
Answer:
Cpu is the point of the computer
Explanation:
GOT IT REEEEEEEEEEEEE
Which nmap switch is used to detect target OS and services?
a -S
b -p
c -F
d -A
Answer:
d -A
Explanation:
The -S switch is used to use a fake source address, and it can mask your ip.
The -p switch is used to indicate which ports you want to scan, because then it searches for all open ports it searches for that one specifically
The -F switch is used as the quick scan mode, scanning the surface
The -A switch is used to check the operating system.
Write an expression that will cause the following code to print "I am a teenager" if the value of userAge is less than 20. Zybooks won't let me edit any other line, and UserAge > 20 was marked wrong. It won't accept the ≥ symbol either.
Answer:
Replace
if userAge > 20
with
userAge > 19
Explanation:
if userAge > 20 checks if age is 21, 22, 23, 24........
The else condition which prints "I am a teenager" checks if age is 20, 19, 18....
Notice that 20 is inclusive of the else condition; this shouldn't be because for userAge to be less than 20, 20 isn't inclusive
To solve this,
Replace if userAge > 20 with userAge > 19
So that, the else
The else condition which prints "I am a teenager" checks if age is 19, 18, 17, 16....
Write a program that reads in a line of text and outputs the line with all the digits in all integer numbers replaced with 'x'. Please enter a line of text: My userID is john17 and my 4 digit pin is 1234 which is secret My userID is john17 and my x digit pin is xxxx which is secret Notes: 1. If a digits is part of a word, then the digit is not changed to an 'x'. For example, john17 is NOT changed to johnxx. 2. You may assume that the text entered by the user will contain only letters (upper case or lower case), digits and spaces. 3. Think how to break down your implementation to functions.
Answer:
import re
def secret_pin_digit( ):
user = input("Please enter a line of text: ")
search_values = re.findall( "\d", user )
for item in search_values:
if int( item ) == "NAN":
user.replace("item", "x")
print( user )
Explanation:
The python function program above prompts the user for a string specifying the user id, username and the user pin. The digits in the string are replaced with an "x". This is used to hide the pin of a user
Select all of the uses of presentation software in the workplace.
to introduce a new project
to sell a product
to train employees
to store large amounts of data
to inspire people
to persuade management
to share information from a report
to call another employee across the country
to raise money for a cause
Answer:
uhm 1, 2, 3, 4, 6, 7, and 8.
Explanation:
because those are all the uses of presentation software in a workplace.
Write a program that calculates taxi fare at a rate of $1.50 per mile. Your pro-gram should interact with the user in this manner:TAXI FARE CALCULATOREnter beginning odometer reading=> 78602.5Enter ending odometer reading=> 78622.7You traveled a distance of 20.2 miles. At $1.50 per mile,your fare is $30.30.
Answer:
print("TAXI FARE CALCULATOR\n")
beginning = float(input("Enter beginning odometer reading => "))
ending = float(input("Enter ending odometer reading => "))
distance = ending - beginning
fare = 1.50 * distance
print("You traveled a distance of %.1f" % distance + " miles. At $1.50 per mile, your fare is $ %.2f" % fare)
Explanation:
*The code is in Python.
Print the title
Ask the user to enter beginning and ending of the odometer reading. Calculate the distance by subtracting these values
Calculate the fare, multiply the distance by 1.50
Print the distance and fare in required format
Write a program that will convert a distance provided in inches to a distance in yards, feet and inches. The program will ask the user to input a distance in inches as a whole number. It will convert the distance provided into yards, feet and inches. Then it will display the distance in yards, feet and inches. For example, the program will convert 50 inches into 1 yard, 1 ft and 2 inches. See the Testing section for test data.
Answer:
Here is the C++ program:
#include <iostream> // to use input output functions
using namespace std; //to access objects like cin cout
int main() { //start of main method
int inches, feet, yards; // declare variables to hold values of inches, feet and yards
cout << "Enter distance in inches: " //prompts user to enter distance in inches
cin >> inches; //reads value of inches from user
feet = inches/12; // divides value of inches (performs integer division) by 12 and store result in feet
inches = inches%12; //takes modulo of inches with 12 and stores the result in inches variable
yards = feet / 3; // divides value of feet with 3 and stores result in yards
feet = feet % 3; //take modulo of value of feet with 3 and stores result in feet variable
cout<<"yards: "<<yards<<endl<<"feet: "<<feet<<endl<<"inches: "<<inches; }
//displays the value of inches into yards feet and inches
Explanation:
I will explain the program with an example:
Suppose the user enters 50 as distance.
inches = 50
feet = inches/12; this statement becomes:
feet = 50/12
The answer of division is 4.166667 but as we are doing integer division so there is no fractional part rather it is represented as whole number and remainder is ignored. So,
feet = 50/12
feet = 4
inches = inches%12; next is this statement which becomes:
inches = 50 % 12
% operator basically computes the remainder. So when 50 is divided by 12 it gives the quotient 4 in integer division and gives 2 as remainder. But we need the value of remainder so,
inches = 50 % 12
inches = 2
yards = feet / 3; next is this statement which becomes:
yards = 4 / 3
Since the value of feet computed in above steps is 4 so this value is divided by 3.
4/3 gives 1.333333 but as we are doing integer division so there is no fractional part rather it is represented as whole number and remainder is ignored. So,
yards = 4 / 3
yards = 1
feet = feet % 3; next is this statement which becomes:
feet = 4 % 3
% operator basically computes the remainder. So when 4 is divided by 3 it gives the quotient 1 in integer division and gives 1 as remainder. But we need the value of remainder so,
feet = 4 % 3
feet = 1
Hence the input distance in inches i.e. 50 is converted to 1 yard, 1 ft and 2 inches as:
yards = 1
feet = 1
inches = 2
If you want to make the program more interactive by dislaying the value of yards, feet and inches as singular and plural then use these if statement in main() function:
if(yards<=1) //checks if value of yard is 1 or less
cout<<yards<<" yard"; //displays 1 yard in singular
else //if value of yard is greater than 1
cout<<yards<<" yards"; //place an "s" with yard to represent value greater than 1
cout<<endl;
if(feet<=1) //checks if value of feet is 1 or less
cout<<feet<<" foot"; //display the value with "foot" representing singular value
else //if value of feet is greater than 1
cout<<feet<<" feet"; //display the value with "feet"
cout<<endl;
if(inches<=1) //checks if value of inches is 1 or less
cout<<inches<<" inch"; //displays 1 inch in singular
else //if value of inches is greater than 1
cout<<inches<<" inches"; //place an "s" with yard to represent value greater than 1
The output of the program is attached.
Which class describes a container for an application?
Answer:
The "container class" would be the correct approach.
Explanation:
A class is known to have become a container class used to keep objects throughout memory via permanent networks, containing appropriate solutions of primitive functions and perhaps other containers This tends to have become a strong combination of predefined behavior and has a well-known framework.What type of operating system runs a dedicated electronic device such as a smart thermostat?
The type of operating system that runs a dedicated electronic device such as a smart thermostat is: embedded operating system.
What is an operating system?An operating system (OS) can be defined as a system software that is typically pre-installed on a computing device, so as to manage (control) software application, computer hardware and user processes.
Types of operating systemThere are different types of operating system (OS) and these include the following:
PC operating systemMobile operating systemNetwork operating systemEmbedded operating systemAn embedded operating system is a specialized type of operating system (OS) that is typically designed and developed to be used in performing a specific task on an electronic device that is not a computer such as a smart thermostat.
Read more on computer here: https://brainly.com/question/959479
The type of operating system runs a dedicated electronic device such as a smart thermostat is An embedded operating system.
What is the embedded operating system ?
An embedded operating system can be regarded as the specialized operating system (OS) which us been created to take up specific task for a device that is not a computer.
It is helps the device's hardware accessible to software.
Learn more about An embedded operating system at;https://brainly.com/question/14408927
Anyone who has an iPod touch and downloads apps from iTunes participates in Digital Commerce and is a digital consumer.
define excretion in plants
Answer:
excretion is the removal of waste from plants
Explanation:
Plants also produce waste but they produce waste very slowly and in very small amounts
They don't have any special organism for the removal of their waste
Their waste products are:
carbon dioxidewater vapouroxygenWe have seen that Internet TCP sockets treat the data being sent as a byte stream but UDP sockets recognize message boundaries. What are one advantage and one disadvantage of byte-oriented API versus having the API explicitly recognize and preserve application-defined message boundaries
Answer:
One advantage of byte-oriented APIs is that all byte of the data sent by the API is retrieved but for APIs with application-defined message boundaries, some bytes of data could be lost in the streaming process.
One disadvantage of byte-oriented APIs is the time it takes to resend a byte increases its propagation delay, while the is an advantage of the APIs with application-defined message boundaries as it does not have to resend any lost bytes of data, making it faster.
Explanation:
Note that byte-oriented APIs uses the TCP socket which resends lost bytes of data and application-defined message boundaries APIs uses the UDP protocol to send data but does not resend if lost.
Which kind of photography takes attractive photos of products to make them stand out?
Answer:
See there are multiple ways to get a perfect shot of products to stand out but the most affective according to me are explained below :-
Macro shooting - These are close shots u can say really close just to show the product more attractive and u can see these types of shots in every advertisement. Background shooting/shots - Opposite of macro shots. 3d shots - These are 360° shots.Tip :- Use wide aperture like F2 and right aperture for right shots.
Hope it helps!
Given an integer n and an array a of length n, your task is to apply the following mutation to a:
Array a mutates into a new array b of length n.
For each i from 0 to n - 1, b[i] = a[i - 1] + a[i] + a[i + 1].
If some element in the sum a[i - 1] + a[i] + a[i + 1] does not exist, it should be set to 0. For example, b[0] should be equal to 0 + a[0] + a[1].
Example
For n = 5 and a = [4, 0, 1, -2, 3], the output should be mutateTheArray(n, a) = [4, 5, -1, 2, 1].
b[0] = 0 + a[0] + a[1] = 0 + 4 + 0 = 4
b[1] = a[0] + a[1] + a[2] = 4 + 0 + 1 = 5
b[2] = a[1] + a[2] + a[3] = 0 + 1 + (-2) = -1
b[3] = a[2] + a[3] + a[4] = 1 + (-2) + 3 = 2
b[4] = a[3] + a[4] + 0 = (-2) + 3 + 0 = 1
So, the resulting array after the mutation will be [4, 5, -1, 2, 1].
Answer:
let a = [4, 0, 1, -2, 3];
let b = a.map( (e, i, arr) => (arr[i-1] || 0)+arr[i]+(arr[i+1] || 0) );
console.log(b);
Explanation:
The map operator is excellent for this. The || 0 operator prevents the undefined out of bounds value from ruining the result.
BTW this solution is in javascript. Other languages will presumably require more code.
What is the main advantage of an MILC?
Answer:
What is the main advantage of an MILC?
Explanation:
MILC cameras combine some of the advantages of DSLR cameras along side the compactness, features and ease of use of point-and-shoot cameras. The main advantages are: A relatively compact and lightweight interchangeable lens camera. Utilizes a relatively large sensor (Micro Four Thirds, APS-C)
Hope that helped.
how many margins are on a page
An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When they attach the file to their email, it shows as 750 bytes. The author gets very upset because they are concerned that part of their book has been deleted by the email address. If you could talk to this author, how would you explain what is happening to their book?
Answer:
The data is transformed to usually make it smaller. It can always be re-constructed back to the original.
Explanation:
I'm on the same lesson on code.org as you, so just go to the question before and the answer to that question was the answer! ;)
Let me know if you got it right!
Learn more:
brainly.com/question/1492433
which of the following is an example of libraries online?
A. iSEEK Education
B. DuckDuckGo
C. WorldCat
D. Ref Seek
The one that is an example of libraries online is iSEEK education. The correct option is A.
What are online libraries?A digital library, also known as an online library, an internet library, a digital repository, or a digital collection, is an online database of digital objects such as text, still images, audio, video, digital documents, or other digital media formats.
This means that students can consult online books, images, videos, and other educational content without having to wait for a physical library to open.
They can do it in a formal setting, such as school, or they can relax at home and get instant access to the information they require.
The benefits of a library management system include online and offline storage, automated backups, and simple upgrades that simplify and improve the learning process.
Thus, the correct option is A.
For more details regarding online libraries, visit:
https://brainly.com/question/6036261
#SPJ3
A(n) ____ is built only after an engineer can prove sound design through structural analysis.
Answer:
no se
Explanation:
pues no se
Answer:
a prototype
Explanation:
Which statements about Excel's FV function are correct?
A. The FV function has five arguments, and their abbreviations are rate, nper, pmt, pv, and type.
B. If the number for the pmt argument is entered as a positive value and the pv value is zero, the FV value is negative.
C. If the interest rate is 10%, the rate argument can be entered as .1 or 10%.
D. All of the options are correct.
Answer:
. D)All of the options are correct.
Explanation:
Excel's FV function can be regarded as financial function that bring about the analysis and calculation of an investment Future's value.
It should be noted that it posses arguments,with abbreviations: rate, nper, pmt, pv, and type.
an Excel's FV function will have negative value If the number for the pmt argument is entered as a positive value and the pv value is zero,
Hence, all the given options are correct.
Not Answered 4.Not Answered Question Workspace Check My Work You purchase a new desktop computer that does not have wireless capability, and then you decide that you want to use a wireless connection to the Internet. What are the least expensive ways (choose two) to upgrade your system to wireless? a. Trade in the computer for another computer that has wireless installed. b. Purchase a second computer that has wireless capability. c. Purchase a wireless expansion card and install it in your system. d. Purchase a USB wireless adapter and connect it to the computer by way of a USB port.
Answer:
c. Purchase a wireless expansion card and install it in your system.
d. Purchase a USB wireless adapter and connect it to the computer by way of a USB port.
Explanation:
Assuming you purchased a new desktop computer that does not have wireless capability, and then you decide that you want to use a wireless connection to the Internet.
The least expensive ways to upgrade your system to wireless is to;
1. Purchase a wireless expansion card and install it in your system. The expansion card is a slot on the motherboard of a computer which allow users use an additional feature such as network, video, sound that may not be available before.
2. Purchase a USB wireless adapter and connect it to the computer by way of a USB port.
So, I have strict parents & need help, if u don’t know how to fix this after u read it, leave. I don’t want u getting points for nothing I’m deleting ur answer if u do it for points. Anyways, I want to get Spotify on my phone, but it says “Enter the password for (my email)”. How do I sign back into it if I don’t know the password. My dad has the password, but I don’t want to get in trouble for stealing his phone to fix mine. Please help, I’ll give the brainliest!
Well if you forgot your password you can click "Forgot Password" at the bottom and it should ask you some questions and send you an email with the password
The principal object of a hash function is __________ .
a. data integrity
b. compression
c. collision resistance
d. mapping messages
Answer:
a. data integrity
Explanation:
In Computer science, a hash function can be defined as any function which is used to map data by accepting a block of data with variable length size or arbitrary size as input to produce a fixed size hash values or codes.
Generally, when a block of data (input) of arbitrary size is hashed, the resulting hash values or codes is usually smaller than the input data. Thus, hash functions are considered to be a compression of data and as a result, sometimes called compression functions. Basically, the block size of a hash function typically ranges from 128 bits to 512 bits.
Some of the properties of a hash function are;
1. Pre-image resistance: this makes it practically impossible to reverse a fixed-size hash values to its initial arbitrary size. This property helps to maintain and enhance data integrity by making it difficult or impossible for an attacker to find the input data from a hash value.
2. Second pre-image resistance: this property makes it near impossible or very difficult to determine or decode another input data from a given set of input and hash values. Also, this helps to enhance data integrity.
3. Collision resistance: this is to make possible for all hash values to have a unique value. This simply means that, with this property it would be difficult for different input data to have the same hash value. Thus, it helps to create integrity in data management.
Hence, with the aforementioned properties, the principal object of a hash function is data integrity.
Hash functions in the computer world includes;
1. Message Digest (MD): it is a 128 bit hash function and comprises of the following; MD2, MD4, MD5, and MD6.
2. Secure Hash Function (SHA): it comprises of the following; SHA-0, SHA-1,SHA-2, and SHA-3.
3. Whirlpool: it comprises of the following; Whirlpool-0, Whirlpool-T, and Whirlpool. It is primarily a 512 bit hash function.
4. RACE Integrity Primitives Evaluation Message Digest (RIPEMD): it comprises of the following versions; RIPEMD, RIPEMD-128, and RIPEMD-160.
List two items that are required to make a text file into a bash script.
Answer:
Explanation:
First a header is needed indicating which bash will be used (sh, zsh, bash, etc.), then it is necessary to change the file extension so that the system recognizes it as an executable file and no longer as text
In order for the system to recognise the file as an executable file rather than a text file, a header indicating which bash will be used is first required (sh, zsh, bash, etc.).
What is bash script?A file containing a succession of commands is called a bash script. The bash programme reads and processes these.
The computer programme runs line by line. For instance, you can use the command line to travel to a specific path, create a folder, and spawn a process inside of it.
Run the "cat" command and then use the redirection operator ">" and the filename to create a new file. You will now be asked to add data to this just created file. To save the file, type line and then hit "Ctrl+D."
A header stating which bash will be used is first necessary for the system to recognise the file as an executable file as opposed to a text file (sh, zsh, bash, etc.).
Thus, these are the two items that are required to make a text file into a bash script.
For more details regarding bash script, visit:
https://brainly.com/question/27962326
#SPJ2
The four key stages with regards to data visualization workflow. Select one key stage and explain it briefly about that stage.Stage 1:Formulating your briefStage 2:Working with dataStage 3:Establishing your editorial thinkingStage 4:Developing your design solution
Answer:
The answer is below
Explanation:
Picking the stage 1.
Formulating your Design Brief is a stage that involves various activities such as planning, establishing, and commencing the project
Hence, at this stage, one has to do the followings
1. Establish the context of the visualization
2. Examine the conditions that will have an effect on the process
3. Clarify the vision of the visualization
4. Point out the event and manner of voice that is required