Write the definition of the function displaySubMenu that displays the following menu; this function doesn't collect the user's input; only display the following menu:
[S]top – Press 'S' to stop.

Answers

Answer 1

Answer:

Using Python:

def displaySubMenu():

   print("[S]top – Press ‘S’ to stop.")

Using C++ programming language:

void displaySubMenu(){

cout<<"[S]top – Press ‘S’ to stop.";}

Explanation:

The function displaySubMenu() has a print statement that prints the following message when this function is called:

[S]top – Press 'S' to stop.

You can invoke this function simply by calling this function as:

displaySubMenu()

The function doesn't take any input from the user and just displays this message on output screen whenever this function is called.

In C++ you can simply call the function using following statement:

void main(){

displaySubMenu(); }

Write The Definition Of The Function DisplaySubMenu That Displays The Following Menu; This Function Doesn't

Related Questions

A Solutions Architect needs to build a resilient data warehouse using Amazon Redshift. The Architect needs to rebuild the Redshift cluster in another region. Which approach can the Architect take to address this requirement

Answers

Answer:

Explanation:

An Amazon Redshift data warehouse refers to a collection of computing resources that are known as nodes. These nodes are organized into a group called a cluster. In order to correctly replicate/rebuild this cluster in another region, the Architect needs to modify the Redshift cluster to take snapshots of the Amazon EBS volumes each day, sharing those snapshots with the other region. These snapshots will provide accurate and up-to-date information allowing for a correct rebuild of the Redshift cluster.

Rijndael, AES, CCMP are same as well as different. They are same in terms of how encryption is done and different in terms of whether each one is a protocol, algorithm or a standard.CCMP is both, a protocol and a standard, Rijndael is:_________ a) standard only b) an algorithm c) a communications protocol. d) patented by US Government

Answers

Answer:

Option (b) is the correct answer to this question.

Explanation:

AES is based on Rijndael Algorithm.

The Rijndael algorithm enables a choice of block sizes and key sizes. The choices are for each of 128, 192, or 256 bits. Once NIST implemented Rijndael for AES, it only specified one block size,128 bits, but maintained three major lengths of selection. IEEE 802.11I go a step and further limits when both the main size and length of the block for 128 bits. It simplifies deployment and relieves users during development from having to make yet again another decision.

Other options are incorrect because they are not related to the given scenario.

The is_positive function should return True if the number received is positive, otherwise it returns None. Can you fill in the gaps to make that happen?

Answers

Question:

The is_positive function should return True if the number received is positive, otherwise it returns None. Can you fill in the gaps to make that happen?

def is_positive(number):

       if  _____ :

           return _____

Answer:

def is_positive(number):

   if (number > 0):

       return True

  else:

       return "None"

---------------------------------------------------------------------------------

Code Test and Sample Output:

print(is_positive(6))

>> True

print(is_positive(-7))

>> None

----------------------------------------------------------------------------------

Explanation:

The code above has been written in Python.

Now, let's explain each of the lines of the code;

Line 1: defines a function called is_positive which takes in a parameter number. i.e

def is_positive(number):

Line 2: checks if the number, supplied as parameter to the function, is positive. A number is positive if it is greater than zero. i.e

if (number > 0):

Line 3: returns a boolean value True if the number is positive. i.e

return True

Line 4: defines the beginning of the else block that is executed if the number is not positive. i.e

else:

Line 5: returns a string value "None" if the number is not positive. i.e

return "None"

All of these put together gives;

===============================

def is_positive(number):

   if (number > 0):

       return True

   else:

       return "None"

================================

An example test of the code has also been given where the function was been called with an argument value of 6 and -7. The results were True and None respectively. i.e

print(is_positive(6))   = True

print(is_positive(-7))  = None

Following are the python program to check input number is positive or negative:

Program:

def is_positive(n):#defining the method is_positive that takes one variable in parameter

   if (n > 0):#defining if block that check input number is positive

       return True#return boolean value that is True

   else:#else block

      return "None"#return string value

n=int(input("Enter number: "))#defining n variable that input a number

print(is_positive(n))#using print method that calls and prints method return value

Output:

please find the attached file.

Program Explanation:

Defining the method "is_positive" that takes one variable "n" in the parameter.Inside the method, if conditional block is defined that checks the input number is positive, if it's true, it will return a boolean value that is "True". Otherwise, it will go to the else block, where it will return a string value that is "None".Outside the method, the "n" variable is declared to be an input number.After the input value, a print method is used that calls the "is_positive" method and prints its return value.

Find out more about the method here:

brainly.com/question/5082157

Implement the function:

string get_ap_terms(int a, int d, size_t n);

which returns a string containing the first n terms of the arithmetic progression (AP) as a sequence of comma-separated values.

Answers

Answer:

This is written in C++

Check comments for explanations

Program starts here

#include<iostream>

#include<string>

using namespace std;

//The function get_ap_terms begins here

string get_ap_terms(int a, int d, int size_tn)

{  

// This line initializes the expected string to empty string

string result = "";

//The for iteration loops through the number of terms the function is expected to return

for(int i = 1; i<= size_tn;i++)

{

//This line checks if the loop is less than the number of  terms    

if(i < size_tn)

  {

//This string gets the current term of the progression

   result+=to_string(a)+ ", ";

//This line calculates the next term

   a+=d;  

  }

  else

  {

//This line calculates the last term

   result+=to_string(a);

  }

}

//This line returns the string containing the first n terms of the arithmetic progression

return result;

}

//The main function starts here

int main()

{

//This line declares the first term (a), the common difference (d) and the number of terms (size_tn)

int a,d,size_tn;

//This line prompts the user for the first term

cout<<"First Term: ";

//This line gets the first term

cin>>a;

//This line prompts the user for the common difference

cout<<"Common Difference: ";

//This line gets the common difference

cin>>d;

//This line prompts the user for number of terms

cout<<"Number of Terms: ";

//This line gets the number of terms

cin>>size_tn;

//This line calls the function to print the string containing the first n terms

cout<<get_ap_terms(a, d, size_tn);

return 0;

}

//Program ends here

James has a USB flash drive that he has used at work. The drive needs to be thrown away, but James wants to make sure that the data is no longer on the drive before he throws it away. What can James use to wipe the data clean?

a. Zero-fill utility
b. Format the drive
c. ATA Secure Erase
d. Smash the USB drive

Answers

Answer:

C. ATA Secure Erase

D. Smash the USB drive

Explanation:

Zero fill utility is a specialized way of formatting a storage device particularly secondary storage such as hard disk, flash drive e.t.c. In this process, the disk contents are overwritten with zeros. Once this has been done, undoing is essentially hard but possible. In most cases, this might just mean that the data content is corrupt and as such might still be recovered, maybe not in its pure entirety.

Formatting the drive on another hand does not essentially mean cleaning the drive and wiping off data. It just means that operating systems cannot see those data contents anymore. They are still present in the drive and can be recovered.

ATA Secure Erase is actually a way of completely and permanently erasing the content in a drive. Once the function has been done, undoing is not possible. Both the data content and even the data management table will be completely gone.

Smashing the USB drive is the surest way of cleaning data as that will permanently destroy the working components of the drive such as the memory chip. And once that happens then there's no drive let alone its contents.

php Exercise 3: Function Write a function named word_count that accepts a string as its parameter and returns the number of words in the string. A word is a sequence of one or more non-space characters (any character other than ' '). For example, the call of word_count("hello, how are you?") should return 4. Constraints: • Do not use any data structures such as arrays to help you solve this problem. • Do not use the String function explode on this problem. • But you can declare as many simple variables like Integer, String, etc. as you like. Keep it simple.

Answers

Answer:

<?php  

function word_count($string){   // function that takes a string a parameter and returns the number of words in that string

   $space = 0;   // this variable is used in order to detect space, new line and tab spaces in a string

   $words = 1; // this variable is used to identify word presence in string

   $include = $space;  //used to maintain the state of $words and $space

   $counter = 0;  // this counts the number of words in the string

   $i = 0;  //this moves through each character of the string

   while ($i < strlen($string)){  // iterates through every character of string until the last character of string is reached

       if ($string[$i] == " "||$string[$i] == "\n" || $string[$i] == "\t")  //if the space or new line or tab space is identified in the string

           $include = $space;  //set the state of include as space if the next character is a space newline or a tab space

       else if ($include == $space) {  //if next character is a word and current state i.e. $include holds $space

           $include = $words;   //  then set the state i.e. $include as $words

           ++$counter; } //increments i to move to next character at each iteration

       ++$i;  } //returns the number of words in a string

   return $counter; }

$str = "Hello, how are you ";  //sample string

echo "Words: " . word_count($str);  // calls word_count function to return number of words in str.

?>  

Explanation:

The program has a function word_count that accepts a string as its parameter and returns the number of words in the string. In the function there are three variables $space and $words and $include used as state variables. For instance $space identifies space, new line and tab spaces in the $string so it specifies that a space has occurred. $words identifies words in the $string so it specifies that a word has occurred. $include holds this state information. $i moves through every character of the $string and when a space occurs in the $string then the state $include is set to $space. When a word occurs then state $include is set to $words. $counter variable, which is used to count the number of words is incremented to 1 when previous state is $space and next character is a word character. Every time a word is seen in the string, this variable is incremented to 1 to keep track of number of words in the string. When $i reaches the end of the string then this loop stops and counter returns the number of words in the $string.

Those with good motor skills are often described as having ...
A. good coordination.
B. poor coordination.
C. athletic coordination,

Answers

The answer is B. Poor coordination

In the above case, those with good motor skills are often described as having good coordination.

What is good coordination?

A coordination skill is known to bee the ability of a person to look at many moving pieces and derive a plan for all the pieces to be put  together.

Therefore, In the above case, those with good motor skills are often described as having good coordination.

Learn more about good coordination from

https://brainly.com/question/1476231

#SPJ9

For vulnerable road users, the areas where roadways transition from one environment to another are...
A. the safest areas.
B. the most clearly marked areas.
C. the most dangerous areas.

Answers

The answer will be C- the most dangerous areas !!!

For vulnerable road users, the areas where roadways transition from one environment to another are the most dangerous areas. Thus the correct answer is C.

What is the environment?

An environment is refers to surroundings in which all the living and nonliving objects exist to survive life. This includes humans, animals, plants, and other resources.

the areas where roadways transition from one environment to another are the most dangerous areas because here drivers first recognize an approaching change in the nature of the roadway and then reduce their speed as appropriate.

Therefore, option C is appropriate.

Learn more about the environment, here:

brainly.com/question/518189?

#SPJ2

All the protocol layers of the internet (Application, Transport. Network) were originally without any security. TLS is one of the security architectures added later. In the Internet protocol stack. TLS is located:________. 1. right above the application layer 2. right below the application layer 3. right below the transport layer 4. right above the IP layer

Answers

Answer:

2. right below the application layer

Explanation:

TLS (Transport Layer Security) is an improved and more secured version of the SSL (Secure Socket Layer) used as cryptographic protocol for providing authentication and encryption over a network. It is initialized at the transport layer of the IP stack and finalized at the application layer. In other words, it is located between the transport and application layer of the Internet protocol stack. And this is necessary so that data received in the application layer from the transport layer are protected from start to end between these two layers.

Therefore, it is safe to say that the TLS is located right below the application layer.  

A network security analyst received an alert about a potential malware threat on a user’s computer. What can the analyst review to get detailed information about this compromise? Check all that apply

Answers

Complete Question:

A network security analyst received an alert about a potential malware threat on a user’s computer. What can the analyst review to get detailed information about this compromise? Check all that apply.

A. Logs.

B. Full Disk Encryption (FDE).

C. Binary whitelisting software.

D. Security Information and Event Management (SIEM) system.

Answer:

A. Logs.

D. Security Information and Event Management (SIEM) system.

Explanation:

If a network security analyst received an alert about a potential malware threat on a user’s computer. In order to get a detailed information about this compromise, the analyst should review both the logs and Security Information and Event Management (SIEM) system.

In Computer science, logs can be defined as records of events triggered by a user, operating system and other software applications running on a computer. Log files are used to gather information stored on a computer such as user activities, system performance and software program.

Security Information and Event Management (SIEM) system is the process of gathering and integration of all the logs generated by a computer from various software application, service, process, or security tool.

These logs collected through the SIEM are shown in a format that is readable by the security analyst and this help in real-time detection of threats.

Hence, logs and SIEM systems are important tools for network security analyst for detection of threats in real-time and event management functions.

DOLLAR GENERAL
x
Knowledge Check
Non-employees are allowed in the store before the store opens and after
closing time.
True
False
SUBMIT​

Answers

Answer:

False

Explanation:

Unless authorized by a manager. Only staff members are allowed in the store before and after normal store hours.

Answer:

The correct answer is

False

If you are not an employee you are not allowed in stores before opening hours or after closing time. The only times non-staff are allowed in the store is for purchasing of products during hours of operation.h

Hope this helps!

If you have taken any drugs, it's not safe to drive.
A. True
B. False

Answers

Answer:

True

Explanation:

It is risky to drive while you are on drugs!

Other Questions
If a4=16 and a8=32 and an= 128 for an arithmetic sequence what is the value of n? Guomindangleaders attemptto unify Chinaunder theircommand.The ChineseCivil War begins.?Which statement best completes the diagram?O A. Rebel groups overthrow China's Qing dynasty.O B. Chinese nationalists defeat northern warlords in China.O C. Yuan Shikai declares himself emperor of China.O D. China is divided into two separate states. For laminar flow over a hot flat plate, the local heat transfer coefficient decreases with distance because (select all that are correct Exhibit 15-3 Potatoes and wheat output (tons per day) Country Potatoes Wheat United States 4 2 Ireland 3 1 In Exhibit 15-3, the United States has an absolute advantage in producing: Group of answer choices Applying Angle Pair RelationshipsTry itZWhat is m 22? 75yWhat is mZ1?1413 16A2/314 155759 126>7w101 11What is the measure of angle 1 Please translate to Spanish without a translator. I go to middle(primary) school. (Make sure you use the yo form of the verb ir.) I need a shoes, belt, and socks.( Make sure you use the yo form of the verb necesitar) My first class starts a 7:15 a.m.(Use the correct form of the verb empezar.) I have six classes.(Use the yo form of the verb tener.) I like to talk in Spanish class and read in Language arts class.(Use the correct form of the verb gustar and the correct pronoun.) Select the correct answer.Identify an action by King Charles I that led to the English Civil War. Suppose the lengths of the pregnancies of a certain animal are approximately normally distributed with mean mu equals 247 days and standard deviation sigma equals 16 days. Complete parts (a) through (f) below. CD=17 AM=5 CD=? I've tried everything but I can't figure it out. Which statement summarizes the main purpose of photosynthesis?OOOIt converts gases to solids in the form of sugar.It converts carbon to oxygen.It converts light energy to chemical energy.It converts energy to mass. ASAP! A boat travelling at top speed upstream moves at 15km/hr. When it travels downstream, again at top speed< it moves at 25km/hr. What is the boat's top speed in still water? factorise this expression as fully as possible 2x^2+6x The US dollar/euro exchange rate is $1.6/ while the Canadian dollar/US dollar exchange rate is C$1.25/$. You also observe that the actual euro/Canadian dollar cross exchange rate is .65/C$. Find the triangular arbitrage profit (in USD) available to someone that has access to $1,000,000. Round intermediate steps to four decimals and your final answer to two decimals. Do not use the dollar sign when entering your answer. Suppose that a high school marching band has 97 members. Of these 97 band members, 31 are seniors, 18 play the trumpet, and 6 are seniors who play the trumpet.What is the probability that a randomly selected band member is a senior given that he or she plays the trumpet? Give your answer as a percentage, rounded to one decimal place.___%What is the probability that a randomly selected band member plays the trumpet given that he or she is a senior?___% If p(x) = x2 - 1 and 4(x) = 5(x-1), which expression is equivalent to (p - 9)(x)?5(x - 1) - x2-1(5x-1) -(x2-1)(x2 - 1) - 5(x - 1)(x2-1) - 5x-1 3. Why did Italy join the Allied Powers: The director of a movie has asked her newly appointed assistant to set up lights as accessories to decorate the set. What type of lights has the director asked him to buy? A. backlight B. background light C. practical light D. fill light E. key light Citing specific textual evidence from Sophocles' Antigone, was Antigone wrong to break Creon's law when his law interfered with her religion and the well-being of her family member? Why or why not? What does this play tell us about societal values in Ancient Greece? file:///C:/Users/solma/Downloads/Sophocles,%20Antigone%20(1).pdf In American history, immigration has played an integral role in society. In the nineteenth and early twentieth centuries, first-generation immigrants who came to the United States often dealt with language and social barriers. In the late twentieth century, second- and third-generation immigrants faced the challenge of following their traditional heritage and fitting into American society. 1. Consider how cultural diversity defines American society and literature. Is the American identity static or fluid over time? Jana has 1500 in her bank account.She has 270 euros of money left from her last holiday andshe wants to put this into her bank account.The bank will convert the euros into pounds using 1 =1.1452 euros.The bank deducts a fee of 0.89 from her savings accountfor this conversion.How much money does Jana now have in her bankaccount?