4 Two people play a counting game.
The rules of the game are as follows:
The first player starts at 1
Each player may choose one, two or three numbers on their turn and the numbers must be in ascending order
Players take it in turns to choose
The player who chooses "15" loses the game. For example, if the first player chooses three numbers (1, 2, 3) then the second player could choose one number (4), two numbers (4, 5) or three numbers (4,5,6).
The first player then takes another go.
-Write an algorithm using pseudocode that allows two players to play this game.
The algorithm should:
--Alternate between player 1 and player 2
--Ask the player how many numbers they would like to choose, ensuring that this is between 1 and 3
--Display the numbers that the player has chosen Display a suitable message to say --which player has won once the number 15 has been displayed​

Answers

Answer 1

Answer:

algorithm should:

--Alternate between player 1 and player 2

--Ask the player how many numbers they would like to choose, ensuring that this is between 1 and 3

Answer 2

An algorithm using pseudocode that allows two players to play the game is:

BEGIN Player One num "1"ASCENDING order num;TURN Player One num;TURN Player Two num;INCREMENT IF there is num "15"THENPLAYER loses

What is a Pseudocode?

This refers to the use of plain language to describe the sequence of steps for solving a problem.

Hence, we can see that from the given game rules about the input that is made by a player where he starts at 1 and any player that selects 15 loses the game and there is an increment is displayed in a rough form above.

Read more about pseudocodes here:

https://brainly.com/question/24953880

#SPJ2


Related Questions

You are moving to an area where DSL will be available in the next six months. Which method of internet connectivity should you implement until DSL is available if your existing connectivity needs are minimal

Answers

Answer:

Answer would be, PSTN (public switched telephone network)

A company with archived and encrypted data looks to archive the associated private keys needed for decryption. The keys should be externally archived and heavily guarded. Which option should the company use?

Answers

Answer:

Key escrow

Explanation:

Encryption is a form of cryptography and typically involves the process of converting or encoding informations in plaintext into a code, known as a ciphertext. Once, an information or data has been encrypted it can only be accessed and deciphered by an authorized user. Some examples of encryption algorithms are 3DES, AES, RC4, RC5, and RSA.

A key escrow can be defined as a data security method of storing very essential cryptographic keys.

Simply stated, key escrow involves a user entrusting his or her cryptographic key to a third party for storage.

As a standard, each cryptographic key stored or kept in an escrow system are directly linked to the respective users and are encrypted in order to prevent breach, theft or unauthorized access.

Hence, the cryptographic keys kept in an escrow system are protected and would not be released to anyone other than the original user (owner).

In conclusion, the option which the company should use is a key escrow.

What will the following code display?


A) 6

B) 0

C) 3

D) 0

1

2

Answers

Answer:

Answer is C) 3

Explanation:

A two-dimensional array of ints, has been created and assigned to a2d. Write an expression whose value is the number of rows in this array.

Answers

Explanation:

oi.........................

The _____ component of a decision support system (DSS) includes mathematical and statistical models that, along with the database, enable a DSS to analyze information.

Answers

Model Base. Hope it helps

when files on storage are scattered throughout different disks or different parts of a disk, what is it called

Answers

Answer:

File Fragmentation or Fragmented Files

Ricard, a sixth-grader, uses codes such as LOL, TTYL, and 411 in his text messages. The use of these codes in this context indicates that Ricard understands:

Answers

Answer: pragmatics

Explanation:

Pragmatics simply means the study of how words are used. It's the study of signs and symbols. Pragmatics includes speech acts, implicature, and conversation.

Since Richard, a sixth-grader, uses codes such as LOL, TTYL, and 411 in his text messages, then the use of these codes in this context indicates that Ricard understands pragmatics.

Elabora un argumento sobre como nuestras acciones impactan en la calidad del aire y promueven acciones a favor del cuidado del ambiente y la salud

AYUDAAAAA!!!!!!!!

Answers

Answer:

Reduzca la cantidad de viajes que realiza en su automóvil. Reduzca o elimine el uso de chimeneas y estufas de leña. Evite quemar hojas, basura y otros materiales. Evite el uso de equipos de jardín y césped que funcionen con gas.

#CarryOnLearning

write history of computer virus. I will mark as brainliest answer ​

Answers

Answer:

The first computer virus, called "Creeper system", was an experimental self-replicating virus released in 1971. It was filling up the hard drive until a computer could not operate any further. This virus was created by BBN technologies in the US. The first computer virus for MS-DOS was "Brain" and was released in 1986.

Mark Brainliest please

Computer viruses have been around for quite a bit and nearly all of them have been spread through the Internet or its predecessors. Most viruses have been designed to steal users' information, processing power and/or disable the system all together.

The first computer virus, called "Creeper system", was an experimental self-replicating virus released in 1971. It was filling up the hard drive until a computer could not operate any further. This virus was created by BBN technologies in the US.

The first computer virus for MS-DOS was "Brain" and was released in 1986. It would overwrite the boot sector on the floppy disk and prevent the computer from booting. It was written by two brothers from Pakistan and was originally designed as a copy protection.

"The Morris" was the first Computer virus which spread extensively in the wild in 1988. It was written by Robert Morris, a graduate student from Cornell University who wanted to use it to determine the size of the internet. His approach used security holes in sendmail and other Unix applications as well as weak passwords, but due to a programming mistake it spread too fast and started to interfere with the normal operation of the computers. It infected around 15,000 computers in 15 hours, which back then was most of the internet.

Since then, many new viruses have been introduced and the trend is growing exponentially every year.

Infamous viruses of the digital age
Following are some of the most well-known or significant viruses that have grown in step with the role of information technology in society:

In 1991, the "Michelangelo" virus was first discovered in Australia. It would lay dormant until 6th March every year and then overwrite the first one hundred sectors on the storage devices with zeros, preventing the computer from booting. Only 20,000 computers were reported infected.

In 1998, CIH was released. It infected around 60 million computers and caused significant damages by overwriting important system files. It was written by a Taiwanese student.

In 1999, "Melissa" was released. This one, was the first wide spread Word Macro Virus. It was distributed via email and would automatically send itself to the first 50 people in the Outlook address book. It did not harm the computer as it was sending out passwords for some erotic websites which required membership. It caused so much email traffic resulting in email servers to crash.

2000 was the year of "iloveyou". Again, it came via email however it sent itself to all contacts. It also overwrote office, image, and audio files. The virus came from the Philippines and infected over 50 million computers in less than 10 days. Most companies back then decided to turn off their email servers to stop spreading the virus.

Since 2000, so many new viruses have been unleashed to wreak havoc on the world at large that it is difficult to list the most infamous. "Anna Kournikova", Code Red, Nimba, Beast, SQL Slammer, Blaster, Sobig, Sober, MyDoom, Netsky, Zeus, Conficker, Stuxnet, CryptoLocker, Locky, Mirai and WannaCry, are a few examples that come to mind.

To increase security on your company's internal network, the administrator has disabled as many ports as possible. However, now you can browse the internet, but you are unable to perform secure credit card transactions. Which port needs to be enabled to allow secure transactions?

Answers

Answer:

443

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

In order to be able to perform secure credit card transactions on your system, you should enable HTTPS operating on port 443.

HTTPS is acronym for Hypertext Transfer Protocol Secure while SSL is acronym for Secure Sockets Layer (SSL). It is a standard protocol designed to enable users securely transport web pages over a transmission control protocol and internet protocol (TCP/IP) network.

Hence, the port that needs to be enabled to allow secure transactions is port 443.

Redundancy can be implemented at a number of points throughout the security architecture, such as in ________. Group of answer choices

Answers

Group of answer choices.

a. firewalls

b. access controls

c. proxy servers

d. All of the above

Answer:

d. All of the above

Explanation:

Cyber security can be defined as a preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

Generally, redundancy to prevent unauthorized access can be implemented at a number of points throughout the security architecture, such as in firewalls, proxy servers and access controls.

A firewall is a network security protocol that monitors and controls inbound and outbound traffic based on set aside security rules.

Generally, a firewall is used to control access to a computer or network, as it creates a barrier between a computer or a network and the internet in order to protect against unauthorized access. It is a security system pre-installed on most computers to essentially inspect data being transmitted to or from a computer.

An access control can be defined as a security technique use for determining whether an individual has the minimum requirements or credentials to access or view resources on a computer by ensuring that they are who they claim to be.

Simply stated, access control is the process of verifying the identity of an individual or electronic device.

When the ping command is used, output is similar across operating systems. Which two values are displayed as part of the output

Answers

Answer: round-trip time

message byte size.

Explanation:

Ping refers to the primary IP command that is used in the troubleshooting of connectivity, and reachability. The ping command is also used in testing the computer's IP address.

When the ping command is used, output is similar across operating systems and the two values that are displayed as part of the output include the round-trip time and the message byte size.

List three ways of breaking a copyright law with the illegal copy of software.​

Answers

Answer:

Using itSelling it Giving it to someone.

Explanation:

Copyright law protects the unauthorized access to, reproduction and distribution of copyrighted material. The permission of the copyright holders is needed if any of these are to be done.

If copyrighted material is used without permission such as using software without buying it, that is illegal. If that software is sold or given to someone else, that is also illegal because it can only be distributed or redistributed by the copyright owners or people they have given access to.

What are the characteristics of an attachment in an email?
O The attachment will always appear in the body of the message.
O The paperclip icon indicates an attached file.
O Bold red type indicates an attached file.
O The attachment can only be viewed if it is in HTML format.

Answers

Answer : the paper clip icon indicates the attached file

IN C++ PLEASE!!! Read integers from input and store each integer into a vector until -1 is read. Do not store -1 into the vector. Then, output all values in the vector that are greater than zero in reverse order, each on a new line.

Ex: If the input is -19 34 -54 65 -1, the output is:

65
34

#include
#include
using namespace std;

int main() {

/* Your solution goes here */

return 0;
}

Answers

#include
#include
using namespace std;

int main(){

int input[] = {-19, 34, -54, 65, -1};
std::vector voutput:
std::vector vinput (input, input + sizeof(input) / sizeof(int) );

for (std::vector::iterator it = vinput.begin(); it != vinput.end(); ++it)
if(*it > 0) voutput.insert(voutput.begin(), *it);
for(std::vector::iterator it = voutput.begin(); it < voutput.end(); ++it)
std::cout << *it << ‘\n’ ;

return 0;
}

The program is an illustration of vectors; vectors are data structures that are used to hold multiple values in one variable name

The main program

The program written in C++, where comments are used to explain each action is as follows:

#include <iostream>

#include <vector>

using namespace std;

int main(){

   //This declares the vector

   vector<int> nums;

   //This declares an integer variable

   int num;

   //Thie gets the first input

   cin>>num;

   //This loops is repeated until the user enters -1

   while(num != -1){

       nums.push_back(num);

       cin>>num; }  

   //This iterates through the vector

   for (auto i = nums.begin(); i != nums.end(); ++i){

       //This checks if the current element is above 1

       if(*i > 0){

           //If yes, the element is printed

           cout << *i <<endl;

       }      

   }

       return 0;

}

Read more about C++ programs at:

https://brainly.com/question/24027643

A sponsored link was delivered 100 times, and 10 people clicked on it. Calculate the click-through rate.

Answers

Answer:

10%

Explanation:

100 / 10 = 10

The primary advantage of hexadecimal notation, compared with binary notation, is its ____________________.

Answers

Answer:

Compactness

Explanation:

Have a nice day!

explain the importance of using onedrive in windows 10, and how knowledge of it will have an impact on today's workplace

Answers

Answer:

The importance of using Onedrive it helps save stuff if you have no more room on your computer it helps with schooling and works for jobs you have Microsoft Teams, Onedrive, Outlook, Office 365. It gives all sorts of things that you can use for anything contacts on Outlook and Teams.

Which type of attack cripples the network and prevents legitimate users from accessing network resources

Answers

Answer:

A Distributed Denial of Service (DDoS) attack is a non-intrusive internet attack made to take down the targeted website or slow it down by flooding the network, server or application with fake traffic. When against a vulnerable resource-intensive endpoint, even a tiny amount of traffic is enough for the attack to succeed.

Distributed Denial of Service (DDoS) attacks are threats that website owners must familiarize themselves with as they are a critical piece of the security landscape. Navigating the various types of DDoS attacks can be challenging and time consuming. To help you understand what a DDoS attack is and how to prevent it, we have written the following guidelines.

1

What is a DDoS attack?

1.1 – Understanding a DDoS Attack

The objective of a DDoS attack is to prevent legitimate users from accessing your website. For a DDoS attack to be successful, the attacker needs to send more requests than the victim server can handle. Another way successful attacks occur is when the attacker sends bogus requests.

1.2 – What is the Goal Behind a DDoS Attack?

The main goal of an attacker that is leveraging a Denial of Service (DoS) attack method is to disrupt a website availability:

The website can become slow to respond to legitimate requests.

The website can be disabled entirely, making it impossible for legitimate users to access it.

what is storage unit in computer and five examples of storage units.

Answers

Answer:

the storage unit of a computer is known as the term which is used to indicate storage capacity.

Explanation:

Five units of storage units are:-

1) byte

2) kilobyte

3) megabyte

4) gigabyte

5) terabyte

define Microsoft Excel 2010​

Answers

Answer:

a very very old Microsoft application that only people on old pc's use now

Explanation:

Answer:

Microsoft Excel is a Microsoft software program that allows users to organize, format, and calculates data using the formulas of a tablet.

This program is part of the Microsoft Office Suite and supports other Office Suite applications. Microsoft Excel can now be purchased on subscription via cloud via office 365, as can other Microsoft Office products.

Explanation:

In Excel, entering a value column and clicking on a cell in the low sheet below allows the cell to add all of the numbers entered above to the "auto sum" button. This takes place in the manual leader counts, which before the development of the modern table were a labor-intensive part of the business.

Microsoft Excel is also a key user technology, useful in training and professional development, in various types of simple case applications. MS Excel has been included in basic corporate computer graduation training for several years, and temporary employment agencies may examine individuals for a wide variety of clerical duties on their skills with Microsoft Word and Microsoft Excel.

The data visualization principle has changed the Microsoft Excel usage cases. Where companies have used Microsoft Excel for, say, hundreds of records in the past, most business cases today involve tablets containing less than a dozen values for each particular project.

what is data processing? What is the output of data processing system?​

Answers

Answer:

A data processing system is a combination of machines, people, and processes that for a set of inputs produces a defined set of outputs. The inputs and outputs are interpreted as data, facts, information etc. depending on the interpreter's relation to the system. ... Conversion converting data to another form or Language.

Explanation:

(⌒_⌒;)

Of the people working in concert with security teams to ensure data quality and protection, the head of information management is responsible for executing policies and procedures, such as backup, versioning, uploading, and downloading. True False

Answers

Answer:

true

Explanation:

because Internet

because Internet

Someone gave me flashcards on a keychan. I have to memorize them and then give them back. Can I back them up to my PC by creating/copy the documents?

Answers

Answer: Yup!

If you'd rather take a picture with your phone, just back transfer the photos into your computer if necessary.

Your friend want to make a copy of your new game you bought the previous day .

Why should you prevent him from doing that?​

Answers

Answer:

It is copyright infringement

Explanation:

Required

Why you should prevent your friend from copying a software you bought

When you purchase a software, you claim ownership of the software (for using the software on your devices); however, your ownership is not a full ownership because the software is an intellectual property of the developer.

This means that, you cannot copy or redistribute the software without the consent of the developer. Doing so, without getting consent, is a copyright infringement.

An aviation tracking system maintains flight records for equipment and personnel. The system is a critical command and control system that must maintain a global availability rate of 99%. The entire system is on a cloud platform that guarantees a failover to multiple zones within a region. In addition to the multi-zonal cloud failover, what other solution would provide the best option to restoring data and rebuilding systems if the primary cloud service becomes unavailable?

Answers

Answer:

offline backup solution

Explanation:

In such a scenario, the best option would be an offline backup solution. This is basically a local and offline server that holds all of the flight record data that the cloud platform has. This offline backup server would be updated frequently so that the data is always up to date. These servers would be owned by the aviation company and would be a secondary solution for the company in case that the cloud platform fails or the company cannot connect to the cloud service for whatever reason. Being offline allows the company to access the database regardless of internet connectivity.

Which command entered without arguments is used to display a list of processes running in the current shell

Answers

Answer:

ps

Explanation:

In Unix and Unix-like operating system, the command used to display the list of processes running in the current shell is ps. For each of these processes, the following details are displayed;

i. PID which indicates the id of the process

ii. TTY which indicates the type of terminal from which the process is running.

iii. TIME which represents the CPU time consumed by the the process and its sub-processes.

iv. CMD which represents the command that runs as the current process.

A data center needs to ensure that data is not lost at the system level in the event of a blackout. Servers must stay operable for at least an eight-hour window as part of the response and recovery controls implemented. Which redundancy effort should be put in place to ensure the data remains available?

Answers

Answer: UPS

Explanation:

The redundancy effort that should be put in place to ensure the data remains available is the Uninterruptible Power Supply(UPS).

Uninterruptible Power Supply (UPS) is necessary in the provision of battery backup power when there's drop or stoppage in the flow of electricity. With regards to the question, it'll ensure that data is not lost at the system level in the event of a blackout.

define business systems​

Answers

A business system is a group of interdependent elements or tasks that meet a business objective. You should document every step for each business process or activity. Business activities consistently produce results. Strategizing how you complete these tasks can help streamline daily operations.

What is the primary hash algorithm used by the NIST project created to collect all known hash values for commercial software and OS files

Answers

Answer:

National Software Reference Library (NSRL).

Explanation:

NIST is acronym for National Institute of Standards and Technology and it's under the U.S. Department of Commerce. The NIST cybersecurity framework (CSF) is a powerful tool that provide guidelines for both the external and internal stakeholders of organization on how they can effectively and efficiently organize, manage, and improve their cybersecurity programs, so as to mitigate the risks associated with cybersecurity.

National Software Reference Library (NSRL) is the primary hash algorithm used by the National Institute of Standards and Technology (NIST) project created to collect all known hash values for commercial software and operating system (OS) files.

Other Questions
A 5.74 kg rock is thrown upwards with a force of 317 N at a location where the local gravitational acceleration is 9.81 m/s^2. What is the net acceleration of the rock? Sarah stole nail polish and lipstick from Wal-Mart. Even though she generally thinks stealing is wrong, she justified her act by stating that the store has a lot of money and will not even miss such small items. According to Sykes and Matza, she has justified her delinquent act with a: A toy rabbit of mass 0.15 kg is accelerated at 8 m/s2 by an angry toddler. Calculate the force exerted on the toy rabbit. The picture shows an organ system in the human body.KidneyABladderWhat is a function of the organ system shown? 2m^2-5m-3=0 by factorization Please a little help in this I will really appreciate it What is the following product?(Xv7-3v8)(xv7-3v8) Alburtis major influence on renaissance painting was in the area of a theory be mathematics see realistic style de materials What proportion of elected officials in the United States represents single-member districts? According to the the following dictionary entry, what part of speech is the word margin as it is used in a sentence Help !!!! Explain how the barter system is impractical, inconvenient, and inefficient. Read the excerpt from Part 3 of The Odyssey by Homer. I made straight for the ship, roused up the men to get aboard and cast off at the stern. They scrambled to their places by the rowlocks and all in line dipped oars in the gray sea.Based on the excerpt, readers can conclude that Odysseuss menA) enjoy their leisure time.B) appreciate their jobs.C) respect their leader.D) forge close friendships. A. Consider the following neutral electron configurations in which n has a constant value. Which configuration would belong to the element with the most negative electron affinity, Eea?1. 2s22. 2s2 2p23. 2s2 2p54. 2s2 2p6B. Arrange the following elements from greatest to least tendency to accept an electron.Rank from greatest to least tendency to accept an electron. To rank items as equivalent, overlap them.1. Sr2. Sn3. Rb4. Te5. I A cylindrical jug that carries 2 of water when it is filled to the brim has a base surface with a diameter of 8cm. What is the length of the jug in cm, rounded to two decimal places? I need this answer guys PLEASE. Will give Brainliest Demand-pull inflation occurs when the price of goods rises suddenly and extremely fast. consumers begin purchasing more goods. producers need more money to make and distribute goods. the government prints more money and pushes prices up. need help w this question thanksss! The following data includes the year, make, model, mileage (in thousands of miles) and asking price (in US dollars) for each of 13 used Honda Odyssey minivans. The data was collected from the Web site.year make model mileage price2004 Honda Odyssey EXL 20 269002004 Honda Odyssey EX 21 230002002 Honda Odyssey 33 175002002 Honda Odyssey 41 189992001 Honda Odyssey EX 43 172002001 Honda Odyssey EX 67 189952000 Honda Odyssey LX 46 13900Required:Compute the correlation between age (in years) and price for these minivans. Mr. Benton had better watch out for that new assistant bf his. He's a one. O a. bright O b. crafty O c. clever 1. The highest risk for the exporter is in a. Letter of credit c. Advance payment b. Bill of exchange d. Consignment sales f(x) = square root 32x g(x) = square root 2x