Your mission is to read this uber-classified memo from the Grand Poobah of annan. Of course, it's in code, so you'll need to write a program to decrypt your message. The code is set up so that for the nth element in the array, you will need to read its nth letter. (Ex: if pirates is in array position 0, then print letter 0 of the word, which = p. if gangway is in array position 4, then print letter 4 = w.) To accomplish this, your main function should do the following: a. Declare 4 separate arrays of strings called secrets1, secrets2, secrets3, & secrets4 and assign them the following values: secrets1: { "platypus", "plethora","trend", "croak","almost", "toaster" }; secrets2: _{ "fire", "seen","trend", "produce" }; secrets3: { "tiretread", "chains", "stern", "bed bug" }; secrets4: {"oracle", "stetson","mother", "stie", "twigrot" }; b. Call the function decode 4 times - once for each array variable (secrets1, secrets2, secrets3 & secreets4) from Step a. (You'll have to do this with 4 lines of code; you can't use a loop for it.) c. Write a void function called decode that will i. Accept an array of strings, and the integer array length as the parameters. ii. Read through each word in the array. If the word is in the nth position of the array, then print the nth letter for that word. (For array item 0, print the letter at position 0 in the word. For array item 1, print the letter at position 1 in the word...etc.) Print all of the letters from this array on one line. iii. Print a blank

Answers

Answer 1

Answer:

Following are the code to this question:

#include<iostream>//declaring header file

using namespace std;  

void decode(string* arr, int n)//defining a method decode

{

for(int i = 0; i < n; i++)//defining a loop for print value

{

cout << arr[i][i] << " "; // using print method to print ith letter of the string

}

cout << endl;//line break

}

int main()//defining main method

{

string secret1[] = {"platypus","plethora","trend","croak","almost","toaster"};//defining string arry and assign value

string secret2[] = {"fire","seen","trend","produce"};//defining string arry and assign value

string secret3[] = {"tiretread","chains","stern","bed bug"};//defining string arry and assign value

string secret4[] = {"oracle","stetson","mother","stie","twigrot"};//defining string arry and assign value

decode(secret1, 6);//calling method decode and pass string array and integer number

decode(secret2, 4);//calling method decode and pass string array and integer number

decode(secret3, 4);//calling method decode and pass string array and integer number

decode(secret4, 5);//calling method decode and pass string array and integer number

return 0;

}

output:

Please find the attachment.

Explanation:

In the above C++ language code, a method "decode" is declared that accepts a string array and an integer variable in its parameter, inside the method a for loop is declared, which is used "n" variable to print its [tex]i^{th}[/tex] letter value in the given string value.  

In the main method,  4 string array "secret1, secret2, secret3, and secret4" is declared which assigns some value, and then we call the method "decode" and pass string array value and an integer value in its parameter.

Your Mission Is To Read This Uber-classified Memo From The Grand Poobah Of Annan. Of Course, It's In

Related Questions

The purpose of validating the results of the program is Group of answer choices To create a model of the program To determine if the program solves the original problem To correct syntax errors To correct runtime errors

Answers

Answer:

To determine if the program solves the original problem

Explanation:

Required

Essence of validating a program

From list of given options, only the above option best describes the given illustration.

When a program is validated, it means that the results of the program are tested to meet the requirements of the user;

For a program to be validated, it means it has passed the stage of error checking and correction; whether syntax or run time errors;

However, when modifications are made, the program will need to be re-validated to ensure that it comports with its requirements.

TLS does not require mutual authentication. Only server must authenticate its public key to the client. Client is authenticated by the application via a password. The most common way for public key authentication would be a. a photo ID. b. a password. c. a certificate. d. biometrics.

Answers

Answer:

c. a certificate.

Explanation:

Public key infrastructure authentication is intended to make transactions occurring through the internet as secure as possible. Public keys are usually assigned to entities like business firms or individuals, and digital certificates are given to them as proof that they have been authenticated.

A certificate authority has the role of signing, storing, and issuing digital certificates. A software or humans could be charged with the responsibility of actually ensuring a key to user binding if all conditions are satisfied.

Eight-queen's problem Consider the classic puzzle of placing eight queens on an 8 x 8 chessboard so that no two queens are in the same row or in the same column or on the same diagonal. How many different positions are there so that
no two queens are on the same square?
no two queens are in the same row?
no two queens are in the same row or in the same column?
Also, estimate how long it would take to find all the solutions to the problem by exhaustive search based on each of these approaches on a computer capable of checking 10 billion positions per second.

Answers

Answer:

12 solutions16,777,21640320 ways

Explanation:

A) No two queens on the same square

Placing eight queens on an 8 * 8 chessboard has a total of 92 Separate   solutions but unique 12 solutions

The total no of possible solutions using the computational method is

= 64! / (56! * 8! ) ~ 4:4 * 109

but since there are 12 unique solution out of the 92 therefore

B) No two queens are in the same row

= 8^8 = 16,777,216

C) No two queens are in the same row or in the same column

= 8! = 40320 ways

It will approximately take less than a second for a computer with the capability of checking 10 billion positions per second to find all the solutions

The CPU control unit is responsible for A. obtaining instructions B. interpreting instructions C. all logic functions D. both A and B

Answers

Answer:

D. Both A and B

Explanation:

Because it controls the input and output of data, check the signals have been delivered successfully, and make sure that data goes to the correct place at the correct time.

Create an application named ArithmeticMethods whose main() method holds two integer variables. Assign values to the variables. In turn, pass each value to methods named displayNumberPlus10(), displayNumberPlus100(), and displayNumberPlus1000(). Create each method to perform the task its name implies. Save the application as ArithmeticMethods.java.

Answers

Answer:

public class ArithmeticMethods

{

public static void main(String[] args) {

    int number1 = 7;

    int number2 = 28;

 displayNumberPlus10(number1);

 displayNumberPlus10(number2);

 displayNumberPlus100(number1);

 displayNumberPlus100(number2);

 displayNumberPlus1000(number1);

 displayNumberPlus1000(number2);

}

public static void displayNumberPlus10(int number){

    System.out.println(number + 10);

}

public static void displayNumberPlus100(int number){

    System.out.println(number + 100);

}

public static void displayNumberPlus1000(int number){

    System.out.println(number + 1000);

}

}

Explanation:

Inside the main:

Initialize two integers, number1 and number2

Call the methods with each integer

Create a method called displayNumberPlus10() that displays the sum of the given number and 10

Create a method called displayNumberPlus100() that displays the sum of the given number and 100

Create a method called displayNumberPlus1000() that displays the sum of the given number and 1000

______is a technology that allows users to access databases that contain case law or statutory law governing a particular issue.​

Answers

Explanation:

In my opinion this is computer assisted legal search

Explain what a honeypot is. In your explanation, give at least one advantage and one disadvantage of deploying a honeypot on a corporate network.

Answers

Answer:

A honeypot is a computer network set up to act as a decoy to track, deflect, or research trying to obtain unwanted access to the information system.

Explanation:

A honeypot is a device or device network designed to imitate possible cyber-attack targets. It can be utilized to detect or deflect assaults from a legitimate military target. It may also be used to collect knowledge on how cybercrime works.

Advantage:-

Data Value:- One of the challenges faced by the research community is to obtain meaning from big data. Companies hold large quantities of data daily including firewall logs, device logs, and warnings for vulnerability scanning. Resources:- The problem facing most protection systems is resource shortages or even the depletion of resources. Power saturation is when a protection asset can no longer work since it is overloaded by its assets. Simplicity :- I find simplicity to be the biggest single strength of honeypots. No flashy techniques are to be created, no stamp computer systems to be managed, no rule units to be misconfigured.

Disadvantage:-  

That honeypot doesn't replace any safety mechanisms; they just operate with your overall security infrastructure and improve it.

The UNIX operating system started the concept of socket which also came with a set of programming application programming interface (API) for 'socket level' programming. A socket was also uniquely identified:

a. as the combination of IP address and port number to allow an application within a computer to set up a connection with another application in another computer without ambiguity.
b. the port number to clearly identify which application is using TCP.
c. IP address to make sure the Internet device using the socket is delineated.
d. the access network, such as Ethernet or Wi-Fi so that multiple LAN devices could be installed on a single computer.

Answers

Answer:

(a). as the combination of IP address and port number to allow an application within a computer to set up a connection with another application in another computer without ambiguity.

Explanation:

The explanation is in the answer.

)You have been asked to do voice-overs and ""wild lines"" for a film. What is your position on the film crew? Boom operator Sound board operator Production sound mixer Sound designer

Answers

Answer:

Sound designer.

Explanation:

A boom operator is responsible for positioning of the microphone.

A sound board operator is responsible for playing pre-recorded sound effects.

A production sound mixer records all sounds on the set.

A sound designer creates and edits new sounds.

In conclusion, it must be a sound designer as this best fits the role.

Which operating system problem might cause the desktop background to change
unexpectedly? Choose the answer.
A boot failure
B startup loop
C malware D incompatibility

Answers

It should be noted that the operating system problem that might cause the desktop background to change is D incompatibility.

What is operating system problem?

The operating system problem serves as those error that can affect the operation of the operating system in computer.

This System errors are caused by malfunctioning hardware components as well as corrupted operating system modules and one of this is compatibility.

Learn more about operating system problem at;

https://brainly.com/question/17506968

Define stubs for the functions get_user_num) and compute_avg). Each stub should print "FIXME: Finish function_name" followed by a newline, and should return -1. Each stub must also contain the function's parameters Sample output with two calls to get_user_num) and one call to compute_avg): FIXME: Finish get_user_num() FIXME: Finish get_user_num() FIXME: Finish compute_avg() Avg: -1 1 ' Your solution goes here '' 2 4 user_num1 = 0 5 user_num2 = 0 6 avg_result = 0 7 8 user_num1 = get_user_num 9 user_num2 = get_user_num ) 10 avg_result = compute_avg(user_num1, user_num2) 11 12 print'Avg:', avg_result)|

Answers

Answer:

Here are the stub functions get_user_num() and compute_avg()

def get_user_num():

   print('FIXME: Finish get_user_num()')

   return -1  

def compute_avg(user_num1, user_num2):

   print('FIXME: Finish compute_avg()')

   return -1

Explanation:

A stub is a small function or a piece of code which is sometimes used in program to test a function before its fully implemented. It can also be used for a longer program that is to be loaded later. It is also used for a long function or program that is remotely located. It is used to test or simulate the functionality of the program.  

The first stub for the function get_user_num() displays FIXME: Finish get_user_num() and then it returns -1.

The seconds stub for the function compute_avg() displays the FIXME: Finish compute_avg() and then it returns -1.

Here with each print statement, there is function name after this FIXME: Finish line. The first function name is get_user_num and the second is compute_avg().

Next the function get_user_num() is called twice and function compute_avg() followed by a print statement: print('Avg:', avg_result) which prints the result. So the program as a whole is given below:

def get_user_num():

   print('FIXME: Finish get_user_num()')

   return -1  

def compute_avg(user_num1, user_num2):

   print('FIXME: Finish compute_avg()')

   return -1  

user_num1 = 0  # the variables are initialized to 0

user_num2 = 0

avg_result = 0  

user_num1 = get_user_num()  #calls get_user_num method

user_num2 = get_user_num()

avg_result = compute_avg(user_num1, user_num2)  

print('Avg:', avg_result)

The method get_user_num() is called twice so the line FIXME: Finish get_user_num() is printed twice on the output screen. The method compute_avg() is called once in this statement avg_result = compute_avg(user_num1, user_num2)   so the line FIXME: Finish compute_avg() is printed once on the output screen. Next the statement print('Avg:', avg_result) displays Avg: -1. You can see in the above program that avg_result = compute_avg(user_num1, user_num2)   and compute_avg function returns -1 so Avg= -1. The program along with the produced outcome is attached.

What happens if you attempt an operation that uses the input stream and the operation fails but the stream is OK

Answers

Answer:

The fail bit of the stream object will be set.

Explanation:

The Input Stream is been used to effectively and efficiently read data from a source .

Therefore in a situation in which an individual or a person attempt an operation that uses the input stream and the operation fails but the stream is OK this means that the fail bit of the stream object will be set . FAILBIT is generally set in a situation where the error that occured involves the loss of integrity of the stream in which it is more likely to persist even if various operation is been carried out or attempted on the stream which is why FAIL BIT can always be checked independently by calling the member function bad.

Lastly FAILBIT is as well set because of a read or write operation that fails.

Assume that a program consists of integer and floating-point instructions. 60% of the total execution time is spent on floating point instructions and the remaining 40% is on integer instructions. How much faster should we run the floating-point instructions to execute entire program 1.25 times faster

Answers

Answer:

the floating-point instructions  should be run 1.5 times faster in order to execute entire program 1.25 times faster

Explanation:

Given that:

a program consists of integer and floating-point instructions. 60% of the total execution time is spent on floating point instructions and the remaining 40% is on integer instructions.

Let the integer be the total execution time = V

The  floating-point instructions = 60%

The integer instruction = 40%

The time spent on the floating-point instruction = 60/100 × V

= 0.6 V

The time spent on t he integer instruction = 40/100 × V

= 0.4 V

However; How much faster should we run the floating-point instructions to execute entire program 1.25 times faster

If we are to execute the entire program 1,25 times faster;

The new execution time = V/1.25

Assuming the new time spent on floating-point instruction = W

W + 0.4 V = V/1.25

W = V/1.25 - 0.4 V

W = (V - 0.5V)/1.25

W = 0.4V

the new time spent on floating-point instruction = W = 0.4 V

The speed required to make the floating -point instruction to run faster = 0.6V/.4 V

= 1.5

Hence,  the floating-point instructions  should be run 1.5 times faster in order to execute entire program 1.25 times faster

For each of these relations on the set {21,22,23,24},decide whether it is re- flexive, whether it is symmetric, whether it is antisymmetric, and whether it is transitive.1. {(22, 22), (22, 23), (22, 24), (23, 22), (23, 23), (23, 24)} 2. {(21,21),(21,22),(22,21),(22,22),(23,23),(24,24)}

Answers

Answer:

1. {(22, 22) (22, 23), (22, 24), (23, 22), (23, 23), (23, 24)} : Not reflective, Not symmetric, Not anti-symmetric, Transitive.

2.  {(21,21),(21,22),(22,21),(22,22),(23,23),(24,24)}: Reflective, symmetric.

Explanation:

Solution

Reflective: Of every element matched to its own element

Symmetric: For every (a,b) there should be (b,a)

Anti-symmetric: For every (a,b) there should not be (b,a)

Transitive: For every (a,b) ∈R and (b,c)∈ R -then (a,c) ER for all a, b, c ∈ A

Now,

1.{(22, 22) (22, 23), (22, 24), (23, 22), (23, 23), (23, 24)}

Not Reflective: This is because we don't have (21,21) (23,23) and (24,24)

Not symmetric: Because we don't have (23,24) and (24,23)

Not anti symmetric: We have both (22,23) and (23,22)

Transitive: It is either 22 or 23 be (a,b) and 24 (b,a)

2. {(21,21),(21,22),(22,21),(22,22),(23,23),(24,24)}

Reflective: For all we have (a,a)

Symmetric: For every (a,b) we have (b,a)

Not Anti-symmetric

Transitive

The key schedule results in generating multiple keys from the one secret key. These multiple keys are used:

a. in multiple sessions of communications one after the other. For example, if someone has 12 keys, they can use it for twelve video calls one after the other.
b. such that one of them is picked up at random at a time.
c. some as private keys, some as public keys.
d. for different rounds of encryption for the same plaintext to strengthen the cipher.

Answers

Answer:

Option(d) is the correct answer to the given question .

Explanation:

There are various type of algorithm is used for the purpose of the key scheduling such as AES .in the AES algorithm we used same key for encryption and decryption of text .The  main objective of the AES algorithm it is used by Various round of the similar plain text encryption to reinforce the cipher text.

The Option (a) is wrong because In the key scheduling the creating keys are not being used one after just another in the various communication cycles.The Option (b) is wrong because In the key scheduling  we do not used the  the random key for the encryption process .The Option (c) is wrong because we will never arbitrarily subdivided into groups of public and private key.

any element that has a starting tag and does not have a closing tag is called a ?
pls be quick guys​

Answers

Answer:

Any element that has a starting tag and doesn't have a closing tag is called a empty element.

:)

How does computer mouse impact the world, society and health?

Answers

Explanation:

Without it, we may have endured convoluted keyboard commands for years, greatly hindering the process of bringing the PC into homes everywhere. The mouse revolutionized computer interfaces, simplified an otherwise scary machine, and helped connect the world.

It's not possible to die in an alcohol-related collision if you're not in an automobile.
A. True
B. False

Answers

Answer:

B. False

Explanation:

Consumption of alcohol is not a good practice and is generally not allowed at the time of driving an automobile and is considered to be an offense as it may be injurious to health and property. As too much alcohol can create possible chances of collusions and even if the person is not in an automobile can result in a collision if tries to cross the road. Like head injuries or leg injuries can occur.

Assume that to_the_power_of is a function that expects two integer parameters and returns the value of the first parameter raised to the power of the second parameter. Write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.

Answers

Answer:

The statement in python is as follows:

to_the_power_of(cube_side,3)

Explanation:

As stated as the requirement of the code segment, the statement takes as parameters a variable cube_side and a constant 3.

It then returns the volume of the cube; i.e. cube raise to power 3

See full program below

def to_the_power_of(val,powe):

    result = val**powe

    print(result)

cube_side = float(input("Cube side: "))

to_the_power_of(cube_side,3)

6. A distribution consists of three components with frequencies 200, 250 and 300 having means
25,10, and 15 and standard deviations 3, 4, and 5 respectively.
Calculate
The mean?
The standard deviation?​

Answers

Answer:

The mean  = 16

The standard deviation = 7.19

Explanation:

N1 = 200  X1 = 25   σ1 = 3

N2= 250  X2 = 10   σ2 = 4

N3 = 300  X3= 15   σ3 = 5

The mean of a combined distribution is given by:

[tex]X = \frac{X_1N_1+X_2N_2+X_3N_3}{N_1+N_2+N_3}\\X = \frac{25*200+10*250+15*300}{200+250+300}\\X=16[/tex]

The differences from the mean for each component are:

[tex]D_1 = 25-16=9\\D_2=10-16=-6\\D_3=15-16=-1[/tex]

The standard deviation of a combined distribution is given by:

[tex]\sigma=\sqrt{\frac{N_1(\sigma_1^2+D_1^2)+N_2(\sigma_2^2+D_2^2)+N_3(\sigma_3^2+D_3^2)}{N_1+N_2+N_3}}\\\sigma=\sqrt{\frac{200(3^2+9^2)+250(4^2+(-6)^2)+300(5^2+(-1)^2)}{200+250+300}}\\\sigma=\sqrt{\frac{18000+13000+7800}{750} }\\\sigma=7.19[/tex]

The mean  = 16

The standard deviation = 7.19

An organization's IRP prioritizes containment over eradication. An incident has been discovered where an attacker outside of the organization has installed crypto-currency mining software on the organization's web servers. Given the organization's stated priorities, which of the following would be the NEXT step?

a. Remove the affected servers from the network.
b. Review firewall and IDS logs to identify possible source IPs.
c. Identify and apply any missing operating system and software patches
d. Delete the malicious software and determine if the servers must be reimaged

Answers

Answer:

a. Remove the affected servers from the network.

Explanation:

An organization's incident response process (IRP) can be defined as all of the process involved in the cleanup and recovery of data when they fall victim to an attack or cybersecurity breach. The incident response process comprises of six (6) important stages and these are;

1. Preparation.

2. Detection and analysis (identification).

3. Containment.

4. Eradication.

5. Recovery.

6. Review of incident activities.

When an organization's IRP prioritizes containment over eradication and an incident is discovered, where an attacker outside the organization installed a crypto-currency mining software on the organization's web servers. Given the organization's stated priorities, the cybersecurity engineer should remove the affected servers from the network.

A containment process is focused on taking steps to eliminate or contain the attack. It basically involves acting swiftly in response to the attack, so as to prevent it from spreading across board or in order to mitigate the damage already caused.

In this context, the cybersecurity engineer should remove the affected servers from the network in accordance with the organization's IRP priority (containment).

Furthermore, he could take a step further to contain the attack by installing a firewall and updating their policies in the Intrusion Prevention System (IPS) of the organization.

#Write a function called 'string_type' which accepts one #string argument and determines what type of string it is. # # - If the string is empty, return "empty". # - If the string is a single character, return "character". # - If the string represents a single word, return "word". # The string is a single word if it has no spaces. # - If the string is a whole sentence, return "sentence". # The string is a sentence if it contains spaces, but # at most one period. # - If the string is a paragraph, return "paragraph". The # string is a paragraph if it contains both spaces and # multiple periods (we won't worry about other # punctuation marks). # - If the string is multiple paragraphs, return "page". # The string is a paragraph if it contains any newline # characters ("\n"). # #Hint: think carefully about what order you should check #these conditions in. # #Hint 2: remember, there exists a count() method that #counts the number of times a string appears in another #string. For example, "blah blah blah".count("blah") #would return 3.

Answers

Answer:

I am writing a Python program:

def string_type(string):

   if string=="":  //if the string is empty

       return "empty"

   elif string.count(".")>1:  #if the period sign occurs more than once in string

       if string.count("\n"):  #checks if the new line occurs in the string

           return "page"  #if both the above cases are true then its a page

       return "paragraph"  # if the period sign condition is true then its a para

   elif string.count(" ")>=1:  #if no of spaces in string occur more than once

       return "sentence"  #returns sentence

   elif len(string)==1:  # if length of the string is 1 this

       return "character"  #returns character

   else:  #if none of the above conditions is true then its a word

       return "word" #returns word

Explanation:

def string_type(string):  this is the definition of method string_type which takes a string as argument and determines whether the type of string is a word, paragraph, page, sentence or empty.

if string=="" this if condition checks if the string is empty. If this condition is true then the method returns "empty"

elif string.count(".")>1  This condition checks if the string type is a paragragh

string.count(".")>1   and if string.count("\n") both statements check if the string type is a page.

Here the count() method is used which is used to return the number of times a specified string or character appears in the given string.

Suppose the string is "Paragraphs need to have multiple sentences. It's true.\n However, two is enough. Yes, two sentences can make a paragraph."

The if condition first checks if count(".")>1 which means it counts the occurrence of period i.e. "." in the string. If the period occurs more than once this means it could be a page. But it could also be a paragraph so in order to determine the correct string type another if statement if string.count("\n") inside elif statement determines if the string is a page or not. This statement checks the number of times a new line appears in the string. So this distinguishes the string type paragraph from string type page.

elif string.count(" ")>=1: statement determines if the string is a sentence. For example if the string is "i love to eat apples." count() method counts the number of times " " space appears in the string. If the space appears more than once this means this cannot be a single word or a character and it has more than one words. So this means its a sentence.

  elif len(string)==1:  this else if condition checks the length of the string. If the length of the string is 1 this means the string only has a single character. Suppose string is "!" Then the len (string) = 1 as it only contains exclamation mark character. So the method returns "character" . If none of the above if and elif conditions evaluates to true then this means the string type is a word.

Answer:

def string_type(string):

  if string=="":  //if the string is empty

      return "empty"

  elif string.count(".")>1:  #if the period sign occurs more than once in string

      if string.count("\n"):  #checks if the new line occurs in the string

          return "page"  #if both the above cases are true then its a page

      return "paragraph"  # if the period sign condition is true then its a para

  elif string.count(" ")>=1:  #if no of spaces in string occur more than once

      return "sentence"  #returns sentence

Explanation:

When introducing new devices to the network, the organization's security policy requires that devices be monitored to establish normal traffic patterns for the device. Which of the following is generated from initial monitoring?
A. SLA
​B. Baseline
​C. Forensic log
D. Vulnerability assessment

Answers

Answer:

The answer is "Option B".

Explanation:

The Baseline measurement is an essential characteristic of effective coal company monitoring programs to assess the degree of mining effects and keep on improving effect monitoring the system will continue to be modified via periodical analyses, and the wrong choices can be defined as follows:

In choice A, it is wrong because it used in 3D printing technology. In choice C, it is used to analyze the log entities, that's why it is wrong. In choice D, it is used to analyze the security weaknesses, that's why it's wrong.

Write a program that inputs a sentence from the user (assume no punctuation), then determines and displays the unique words in alphabetical order. Treat uppercase and lowercase letters the same.

Answers

Answer:

Following are the code to this question:

val={} #defining dictionary variable val

def unique_word(i):#defining a method unique_word    

   if i in val: #defining if condition to add value in dictonary          

       val[i] += 1#add values  

   else: #defining else block to update values        

       val.update({i: 1})#updating dictionary

s =input('Enter string value: ') #defining s variable for input string value

w=s.split()#split string value and sorte in w variable

w.sort() #sorting the value  

for i in w: #defining loop for pass value in method unique_word

   unique_word(i)#assign value and calling the unique_word method

for j in val:# defining for loop to print dictionary value  

   if val[j] == 1: #defining if block to check value is unique  

       print(j) #print value

Output:

Enter string value: my name is dataman

dataman

name

is

my  

Explanation:

In the above python code, a dictionary variable "val" is declared, which is used in the method "unique_word" that uses if block to count unique word and in the else block it update its value. In the next step, s variable is declared, that the user input method to store the value and another variable "w" is defined that split and sort the string value. In the last step, two for loop is declared in which the first loop passes the string value and calls the method "unique_word", and in the second loop if block is defined that check unique value and prints its value.

A pen testing method in which a tester with access to an application behind its firewall imitates an attack that could be caused by a malicious insider.

a. True
b. False

Answers

Answer:

a. True

Explanation:

The statement that a pen testing method or penetration test in which a tester who has a means of entry to an application behind its firewall imitates an attack that could be caused by a malicious insider.

A penetration test, which is also refer to as a pen test, pentest or ethical hacking, is an approved simulated cyberattack done on a computer system, performed in order to evaluate the security of the system. The test is carried out to identify both weaknesses or vulnerabilities including the potential for unauthorized parties to penetrate to the system's features and data.

The main purpose of performing this test is to identify any vulnerability in a system's defenses which attackers may take advantage of.

A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated.

(1) Output the user's input. Enter integer: 4 You entered: 4

(2) Extend to output the input squared and cubed. Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!!

(3) Extend to get a second user input into userNum2. Output sum and product. Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! Enter another integer: 5 4+5 is 9 4*5 is 20.

Answers

Answer:

This program is written using Java programming language.

No comments were used; however, see explanation section for line by line explanation

import java.util.*;

public class Nums {

   public static void main(String args[]) {

     Scanner input = new Scanner(System.in);

     System.out.println("1.");

     int userNum;

     System.out.print("Enter Integer: ");

     userNum = input.nextInt();

     System.out.println("You entered: "+userNum);

     

     System.out.println("2.");

     System.out.print("Enter Integer: ");

     userNum = input.nextInt();

     System.out.println("You entered: "+userNum);

     System.out.println(userNum+" squared is "+(userNum * userNum));

     System.out.println("And "+userNum+" cubed is "+(userNum * userNum * userNum)+"!!");

     

     System.out.println("3.");

     System.out.print("Enter Another integer: ");

     int userNum2 = input.nextInt();

     System.out.println(userNum+" + "+userNum2+" is "+(userNum + userNum2));

     System.out.println(userNum+" * "+userNum2+" is "+(userNum * userNum2));

     

   }

}

Explanation:

This enables the program accept inputs

     Scanner input = new Scanner(System.in);

This signifies the beginning of number 1

     System.out.println("1.");

Variable userNum is declared as type integer

     int userNum;

The line prompts the user for input

     System.out.print("Enter Integer: ");

The line accepts the input

     userNum = input.nextInt();

This line displays user input

     System.out.println("You entered: "+userNum);

     

This signifies the beginning of number 2

     System.out.println("2.");

This line prompts the user for input

     System.out.print("Enter Integer: ");

This line accepts input

     userNum = input.nextInt();

This line prints user input (as required in number 2)

     System.out.println("You entered: "+userNum);

This line calculates and prints the square of user input

     System.out.println(userNum+" squared is "+(userNum * userNum));

This line calculates and prints the cube of user input

     System.out.println("And "+userNum+" cubed is "+(userNum * userNum * userNum)+"!!");

     

This signifies the beginning of number 3

     System.out.println("3.");

This line prompts the user for another integer value

     System.out.print("Enter Another integer: ");

This line accepts the input from the user

     int userNum2 = input.nextInt();

This line adds the two inputs by the user and displays the result

     System.out.println(userNum+" + "+userNum2+" is "+(userNum + userNum2));

This line multiplies the two inputs by the user and displays the result

     System.out.println(userNum+" * "+userNum2+" is "+(userNum * userNum2));

Calculator Create a program that calculates three options for an appropriate tip to leave after a meal at a restaurant.

Specifications:

a. The program should calculate and display the cost of tipping at 15%, 20%, or 25%.
b. Assume the user will enter valid data.
c. The program should round results to a maximum of two decimal places.

Answers

Answer:

I am writing a Python program:

print("Tip Calculator \n")

bill = float(input("Cost of meal: "))

tip15pc = bill * 0.15

tip20pc = bill * 0.20

tip25pc = bill * 0.25

print("\n15%")

print("Tip amount: %.2f"% (tip15pc))

print("Total amount: %.2f \n" % (bill + tip15pc))

print("20%")

print("Tip amount: %.2f"% (tip20pc))

print("Total amount: %.2f \n" % (bill + tip20pc))

print("25%")

print("Tip amount: %.2f"% (tip25pc))

print("Total amount: %.2f" % (bill + tip25pc))

Explanation:

The program first prints the message: Tip Calculator

bill = float(input("Cost of meal: ")) This statement prompts the user to enter the amount of the bill of meal. The input value is taken as decimal/floating point number from user.

tip15pc = bill * 0.15  This statement calculates the cost of tipping at 15%

tip20pc = bill * 0.20 This statement calculates the cost of tipping at 20%

tip25pc = bill * 0.25 This statement calculates the cost of tipping at 25%

print("\n15%")  This statement prints the message 15%

print("Tip amount: %.2f"% (tip15pc))  this statement displays the amount of tip at 15% and the value is displayed up to 2 decimal places as specified by %.2f

print("Total amount: %.2f \n" % (bill + tip15pc))  This statement prints the total amount by adding the cost of mean with the 15% tip amount.

The program further computes the the amount of tip at 20% and 25%. The resultant values are displayed up to 2 decimal places as specified by %.2f Then the program prints the total amount by adding the cost of mean with the 20%  and 25% tip amounts just as computed for the 15% tip.

The screenshot of the program as well as its output is attached.

"The correct syntax for passing an array as an argument to a method when a method is called and an array is passed to it is: "

Answers

Question:

"The correct syntax for passing an array as an argument to a method when a method is called and an array is passed to it is: "

A) a[0]..a[a.length]

B) a()

C) a

D) a[]  

Answer:

The correct answer is A.

An example is given in the attachment.

Cheers!

Identify and write the errors given in the flowchart (with steps and flowchart) : Start ↓ Input A,B ↓ Average = (A + B + C) / 3 ↓ Print Average ↓ Stop

Answers

Answer:

i will send you the answers in the next 10minute

A vowel word is a word that contains every vowel. Some examples of vowel words are sequoia, facetious, and dialogue. Determine if a word input by the user is a vowel word.

Answers

Answer:

vowels = ("a", "e", "i", "o", "u")

word = input("Enter a word: ")

is_all = True

for c in vowels:

   if c not in word:

       is_all = False

if is_all == True:

   print(word + " is a vowel word.")

else:

   print(word + " is not a vowel word.")

Explanation:

Initialize a tuple, vowels, containing every vowel

Ask the user to enter a word

Initially, set the is_all as True. This will be used to check, if every vowel is in word or not.

Create a for loop that iterates through the vowels. Inside the loop, check if each vowel is in the word or not. If one of the vowel is not in the vowels, set the is_all as False.

When the loop is done, check the is_all. If it is True, the word is a vowel word. Otherwise, it is not a vowel word.

Other Questions
find the Pythagorean triplets of 5 The sports bar owner runs a regression to test whether there is a relationship between Red Sox away games and daily revenue. Which of the following statements about the regression output is true?A. The average daily revenue for days when the Red Sox do not play away is $1,768.32.B. The average daily revenue for days when the Red Sox play away is $1,768.32.C. The average daily revenue for days when the Red Sox play away is $2,264.57.D. The average daily revenue for days when the Red Sox do not play away is $1,272.07.E. On average, the bars revenue is $496.25 higher on days when the Red Sox play away than on days when they do not. SUMMARY OUTPUT Regression Statistics Multiple R 0.4746 R Square 0.2252 Adusted R square 0.2091 Standard Error 466.32 Observations 50 ANOVA Significance F MS df 0.0005 13.95 3.03E 06 3.03E+06 Regression 1.04E+07 2.17E+05 48 Residual 135E+07 49 Total Lower 95% Upper 95% tStot Standard Error P-vatue Coefficients 1968.21 17.79 1,568.42 99 42 0.0000 1768.32 Intercept Red Sox away game 763.38 00005 3.74 229.13 132.85 (1-yes, 0-no) 496.25 The average daily revenue for days when the Red Sox do not play away is $1,768.32 What describes the materials and equipment needed and procedures to follow in anexperiment? In a fixed-target experiment positrons are fired at a target of electrons at rest. What positron energy is required to produce a Z (mZ = 91.188 GeV)? The vector a and the vector b are shown on the grid.y6a) Write a as a column vectorAvaaAb2b) Work out 2a - b as a column 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. People from which culture would prefer that healthcare professionals not intrude on personal space and not use first names (unless invited to do so)? A. African Americans B. Italians C. Latin Americans D. Germans Matthews Fender, which uses a standard cost system, manufactured 20 comma 000 boat fenders during 2018, using 143 comma 000 square feet of extruded vinyl purchased at $ 1.30 per square foot. Production required 400 direct labor hours that cost $ 16.00 per hour. The direct materials standard was seven square feet of vinyl per fender, at a standard cost of $ 1.35 per square foot. The labor standard was 0.028 direct labor hour per fender, at a standard cost of $ 15.00 per hour. Complete the costs and efficiency variances for Direct materials and direct labor. Does the pattern of variances suggest Pro Fender's managers have been making trade-offs? Explain. What led to the passage of the Pendleton Act? (PLEASE HELP ME WILL MARK YOU BRAINLIST)Voters wanted an end to Reconstruction.Voters wanted an end to the spoils system.The government wanted to curb immigration.Government corruption was leading to overspending. What is a substrate? a molecule that acts as a catalyst a place where the reaction occurs a place on the product where the enzyme fits a reactant that is catalyzed by an enzyme On December 31 of the current year, the unadjusted trial balance of a company using the percent of receivables method to estimate bad debt included the following: Accounts Receivable, debit balance of $98,800; Allowance for Doubtful Accounts, credit balance of $1,121. What amount should be debited to Bad Debts Expense, assuming 5% of outstanding accounts receivable at the end of the current year are estimated to be uncollectible The shape in the figure is constructed from several identical squares. If the side of each square is 1 unit, what is the area and the perimeter of the shape? I NEED HELP PLEASE, THANKS! :) Generate an explanation for the following formula: P = IR . Explain. What might be the best explanation for why the ancient Greeks were influenced by so many different cultures? Question 4 options: The ancient Greeks were naturally curious. The ancient Greeks conquered the entire Mediterranean area. The ancient Greeks began in Mesopotamia before migrating to Greece. The ancient Greeks lived in an area with easy access to the Mediterranean Sea. 5) what is the weight of aif its weightis 5N in moon?body in the earth, Match the ancient scientists to the works they are known for The school's square parking lot has anarea of 3025 ft2. What is the length of eachside of the parking lot? On December 31, Strike Company has decided to discard one of its batting cages. The initial cost of the equipment was $219,818.00 with an accumulated depreciation of $197,836.20. Depreciation has been taken up to the end of the year. The following will be included in the entry to record the disposal.Select the correct answer.Equipment Cr. $219,818.00Loss on Disposal of Asset Dr. $197,836.20Accumulated Depreciation Dr. $219,818.00Gain on Disposal of Asset Cr. $21,981.80 A cylinder with a diameter of 8 inches and height of 12 inches.Ross is wrapping a gift. The package is shaped like the cylinder shown. What is the least amount of paper he needs to cover the entire cylinder? Use 3.14 for Pi.401.92 in.2602.88 in.31004.8 in.22411.52 in.3 Mia had $22 . Then she started to receive $4 a week as an allowance. She plans to save all of her money for a bicycle and draws a graph of her planned savings. Mia lets x represent the number of weeks she has received her allowance, and y represent her total amount of money. Which of the following ordered pairs is on Mia's graph? ANSWER CHOICES: (2,44) (5,42) (6,24) (1,22)