1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Rina8888 [55]
3 years ago
9

There is a function we are providing in for you in this problem called square. It takes one integer and returns the square of th

at integer value. Write code to assign a variable called xyz the value 5*5 (five squared). Use the square function, rather than just multiplying with *. Save
Computers and Technology
1 answer:
anastassius [24]3 years ago
3 0

Answer:

xyz = 25  

result = square(xyz)

print(result)

The above code assigns the value 25 to variable xyz as 5*5=25. Then next statement is a function call to square() function passing xyz to this function in order to compute the square of 25. The output is:

625

Explanation:

The above code can also be written as:

xyz = 5*5

result = square(xyz)

print(result)

The difference is that xyz is assiged 5*5 which is equal to 25 so the output produced will be the same i.e.  625.

The result variable is used to store the value of square of 25 after the square() method computes and returns the square of 25. So print(result) prints the resultant value stored in the result variable i.e. 625

You might be interested in
Sequence encryption is a series of encryptions and decryptions between a number of systems, wherein each system in a network dec
valentina_108 [34]

Answer:

The answer is True.

Explanation:

In a Network data transfer, it is essential for the security purpose that data should be in encrypted form which an unreadable form and it will be decrypted when it reaches the destination system.

It is important for the organization to encrypt data to make it safe from hackers and cryptographic technology is used in data Sequence encryption.

There is a key that is used to decrypt data in the network system and encryption and decryption is a sequential process for the data starting from the initial system and ending in the destination system.

3 0
3 years ago
Jjgdg gegg tget t446v
lesya692 [45]
Hmmm yes, this seems reasonable
7 0
3 years ago
Read 2 more answers
Compare and contrast the TwoFish encryption algorithm with the DES and AES algorithms. In your comparison be sure to compare and
zheka24 [161]

Answer:

The comparison is done based on their basic, principle, plaintext, key size, rounds, rounds name, security and speed. See the attached document.

Explanation:

The the attachment

8 0
4 years ago
. Write a function definition as follows: it returns the C++ form of a Boolean value, its function identifier is anyTwoTheSame,
Paraphin [41]

Answer:

The c++ code to implement the Boolean function is given. The function definition is shown.

bool anyTwoTheSame(float a, float b, float c)

{

   bool same = false;    

   if(a == b)

       same = true;

   else if(a == c)

       same = true;

   else if(b == c)

       same = true;        

   return same;

}

Explanation:

This function accepts three floating point numbers and returns true if any two numbers are equal else returns false.

The program below shows the implementation of this method.

#include <iostream>

using namespace std;

bool anyTwoTheSame(float a, float b, float c);

bool anyTwoTheSame(float a, float b, float c)

{

   bool same = false;    

   if(a == b)

       same = true;

   else if(a == c)

       same = true;

   else if(b == c)

       same = true;        

   return same;

}

int main() {    

   float one=12.34, two=56.78, three=90.1;    

   cout<<"Two numbers are same : " <<anyTwoTheSame(one, two, three);

}

OUTPUT

Two numbers are same : 0

The method is first declared.

bool anyTwoTheSame(float a, float b, float c);

Next step is method definition which shows what the function is supposed to do. The test to check equality of two numbers is implemented as shown.

bool same = false;    

if(a == b)

       same = true;

   else if(a == c)

       same = true;

   else if(b == c)

       same = true;  

This is the simplest test which can be programmed.

If the numbers are not same, the Boolean variable, same, remains initialized to false.

This function is then called in main method.

No user input is taken as this is not specified in the question.

The three floating variables are declared and initialized inside the main. The values are put inside the program and not taken from the user.

The output shows either 0 or 1. 0 represents false and 1 represents true.

This program can be tested for different values of floating variables.

3 0
3 years ago
When coding, how do you get animations to work??
Nina [5.8K]

Answer:

Blender's animation & rigging if you are talking about 3d modeling.

Explanation:

Blender is a standard free to use universally used software used in animation for most standard games. You learn to model, then to rig with bones, then to animate. Animations don't entirely go with coding unless you are calling them in the code to make them play.

7 0
4 years ago
Other questions:
  • I'm curious why I would need to know this on a school learning site.
    12·1 answer
  • Jane, an employee in the human resources department, has created several important PDF documents on her computer that all office
    9·2 answers
  • Write a program to read customer number, Name, loan amount, interest rate and time of repayment. Calculate and display the EMI .
    9·1 answer
  • What’s the best description of an opportunity cost
    5·1 answer
  • What is the primary benefit of using solid state storage
    7·1 answer
  • The find and
    10·1 answer
  • You can divide the code for an application into logical parts by moving some of the code from the main() method to other _______
    8·1 answer
  • After you configure backup settings using the backup plugin, backup jobs will run automatically and start taking backups at the
    13·1 answer
  • Identify the error and write correct HTML program 5 Cyber Bullying Tips&lt;\head&gt;Don't Respond Talk to a trusted adult &lt;|h
    14·1 answer
  • Why would internet speed test be different on same network
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!