I have a variable and set it equal to 5. 1 then send it as an argument to a function that adds 5 to the variable passed in. Outside the function print the variable (after the function executes).
What will it print?
A. 5+1
B. 4
C. 6
D. 5

Answers

Answer 1

Answer:

D. 5

Explanation:

If the variables original value was 5 then the value that will be printed is 5. This is because the variable is being passed as a parameter into the function and 5 is being added to the parameter value, not the actual global variable outside. Therefore, in order for the adjusted value to be printed then that new value that is returned by the function needs to be saved in a new variable. This can be seen in the example code below.

I Have A Variable And Set It Equal To 5. 1 Then Send It As An Argument To A Function That Adds 5 To The

Related Questions

I have a D in one of my majors, I got a lot of 70s and I'm failing music. im in middle school. Will I be held back? Please answer this

Answers

Answer:

probably sorry it will be okay

Depends on where you’re from and what grading scale is used. I wouldn’t say you’re ruined if you push hard the rest of the year.

You are given an array of integers. Your task is to create pairs of them, such that every created pair has the same sum. This sum is not specified, but the number of created pairs should be the maximum possible. Each array element may belong to one pair only.

Write a function

class Solution public int
solution (int[] A); }

that, given an array A consisting of N integers, returns the maximum possible number of pairs with the same sum.

Examples:
1. Given A = [1, 9, 8, 100, 2], the function should return 2. The pairs are (A[0]. A[1]) and (A[2], A[4]); the sum of each pair is 10.
2. Given A = [2, 2, 2, 3], the function should return 1. Although, for instance, A[0]+A[1] = A[0]+A[2], the pairs (A[0], A[1]) and (A[0], A[2]) cannot exist at the same time, because they both contain a common element, A[0].

Answers

Complete PYTHON code with explanation:

def solution(nums):

# form a dictionary which will store

# the possible pair's sum as key and the indexs used for the sum

sumAndpair = {}

# for every element in list nums

for i in range(len(nums)):

# iterate on all the element to the right of current element

for j in range(i+1,len(nums)):

# calculate the sum of current 2 elements

sum = nums[i] + nums[j]

# if the sum is already in the dictionay

if sum in sumAndpair:

# check if the current index have already been used

# if yes, then continue to next iteration

# this will make sure that same number have not been used more than once

if i in sumAndpair[sum] or j in sumAndpair[sum]:

continue

# if no, then append the current i and j to the value of current sum

else:

sumAndpair[sum].append(i)

sumAndpair[sum].append(j)

# if the current sum is not in the dictionary

# add the sum as key with a list of index used

else:

sumAndpair[sum] = [i, j]

# copmpute the maximum possible number of pairs with the same sum

# which will be the maximum length value out of all the possible sum

# this maximum length will be divided by 2, since a pair of i, j contrinute to one sum

maxLength = 0

for key, value in sumAndpair.items():

if maxLength

What is important to know from a software development perspective about this topic and its relationship with traditional operating systems? How does developing the software for each platform differ? How is it similar?

Answers

What is important to know from a software development perspective about this topic and its relationship with traditional operating systems? How does ...

If a client must wait too long for software that works, he might attempt to add requests for more and more features to be added to the program. This is known as ________.

Answers

Answer:

scope creep

Explanation:

Journalize the following transactions using the direct write-off method of accounting for uncollectible receivables.

April. 1 Sold merchandise on account to Jim Dobbs, $7,200. The cost of goods sold is $5,400.
June 10 Received payment for one-third of the receivable from Jim Dobbs and wrote off the remainder.
Oct. 11 Reinstated the account of Jim Dobbs and received cash in full payment.

Answers

The journal entry for the transactions will be:

1st April

Debit Account receivables $7200

Credit Sales $7200

(To record sales)

Debit Cost of goods sold $5400

Credit Inventory $5400

(To record cost of goods sold)

10th June

Debit Cash $2400

Credit Account receivable $2400

(To record cash received from customer)

Debit Allowance for uncollectible items $4800

Credit Account receivable $4800

(To record write-off)

11th October

Debit Account receivable $4800

Credit Allowance for uncollectible items $4800

( To record reinstatement of account)

Debit Cash $4800

Credit Account receivable $4800

( To record full cash gotten from customer)

The account receivable on 10th June was calculated as:

= (1/3 × $7200) = $2400

Learn more about journal entry on:

https://brainly.com/question/8913038

A company Digicom Parts manufactures 2 types of unique products for laptop and desktop computers. It manufactures 10 types of laptop products and 42 types of desktop products. Each product manufactured by the company has a unique productID from a-z and A-Z. The laptop product have productID (a, i, e, o, u, ALE, O, U) while the rest of the productIDs are assigned to the desktop products. The company manager wishes to find the sales data for the desktop products. Given a list of productIDs of the sales of the last N products, write an algorithm to help the manager find the productIDs of the desktop products.

Answers

Algorithms are used as a prototype of an actual program, during project design.

The algorithm the manager can use to find the productID of the desktop products is as follows:

Start

i = 0

if i > N, then Exit:

  Input productID:

       If productID.upper() == 'A' or 'I' or 'E' or 'O' or 'U':

                 Process data as desktop products

  i++

Go to step 2

Stop

Note that algorithms do not conform to programming syntax.

Read more about algorithms at:

https://brainly.com/question/24793921

write a code for a program in which the parent had to ask from user that how many child user wants to create and then it should fork that many Childs?

Answers

Answer:

//same program different code

#include<stdio.h>

#include<unistd.h>

#include<stdlib.h>

int main()

{

   int pid;

   pid=fork();

   if(pid<0)

   {

       printf("\n Error ");

       exit(1);

   }

   else if(pid==0)

   {

       printf("\n Hello I am the child process ");

       printf("\n My pid is %d ",getpid());

       exit(0);

   }

   else

   {

       printf("\n Hello I am the parent process ");

       printf("\n My actual pid is %d \n ",getpid());

       exit(1);

   }

}

Explanation:

Following are the program to the given question:

Program Explanation:

Include header file.Defining the main method.Defining an integer variable "n, i", after defining this use "n" to the input value.In the next step, a loop is declared that uses if block that checks fork value equal to 0, in which it calls the sleep method and prints its value.At the last, it calls the wait method.  

Program:

#include<stdio.h>//header file

#include<sys/types.h>

#include<sys/wait.h>

#include<unistd.h>

int main()//defining the main method

{

   int n,i;//defining an integer variable

   printf("Enter the number of child to be created:"); //print message

   scanf("%d", &n);//input value in n

   for(i=0;i<n;i++) // defining a loop that use if block with the frok method to print value  

   {

       if(fork() == 0)//use if that check fork method value equal to 0

       {

           sleep(3);//calling sleep method

           printf("[child] pid %d from [parent] pid %d\n",getpid(),getppid());//print message

       }

   }

   wait(NULL);//calling wait method

   return 0;

}

Output:

Please find the attached file.

Learn more:

brainly.com/question/17925458

explain the use of mail merge feature.
pls help​

Answers

Mail Merge is a handy feature that incorporates data from both Microsoft Word and Microsoft Excel and allows you to create multiple documents at once, such as letters, saving you the time and effort of retyping the same letter over and over.

A hybrid data mart ________ data from a data warehouse as well as other data collection systems. It incorporates a top-down approach, end-user inputs, and enterprise-level integration. g

Answers

Answer:

Hybrid Data Marts

A hybrid data mart allows you to combine input from sources other than a data warehouse. This could be useful for many situations, especially when you need ad hoc integration, such as after a new group or product is added to the organization.

We can use a hybrid data mart to mix data from sources other than a data warehouse, and the further discussion can be defined as follows:

Hybrid Data Marts:

It could be useful in a variety of scenarios, particularly when informal integration is required, like when a new group or product is added to the organization.

We can use a hybrid data mart to combine data from various sources other than a data warehouse. It's a structure or access pattern that retrieves client-specific data in data warehouse environments. This data mart is a subset of a data warehouse that is typically focused on a particular business line or functional area.

Therefore, the final answer is "separates".

Find out more about the Hybrid Data Marts here:

brainly.com/question/13989635

A trace table is used for

Answers

Answer:

Trace tables are used to allow programmers to trace the value of variables as each line of code is executed.

Explanation:

The values of the variables are displayed in a table and assist the programmer in identifying any potential errors.

Answer:

Trace tables can enable a programmer to trace the values of variables as each line is executed/processed/ran through the program. And yes, can aid programmers to identify potential errors in the code.

Explanation:

How do I open a letter doc in my documents in my documents folder?

Answers

Double click the letter doc, it s hold open automatically

Alexis plans to stop trading once she lose 5% of her account balance, her account balance is $215.00. How much money is she willing to lose ?

Answers

Answer:

She's willing to lose $10.75.

Explanation:

$215.00 * .05 = answer

         or

$215.00 * .95 = x

$215.00 - x = answer

Which of the following is NOT an arithmetic operator?

Answers

Considering the available options, the choice that is NOT an arithmetic operator is "]."

What is Arithmetic Operator?

Arithmetic Operator is the term used in computer science to describe the mathematical function that takes two operands while making calculations.

Arithmetic Operators are generally used for arithmetic and sequential calculation.

Major Arithmetic Operators

+ (addition), - (subtraction), * (multiplication), / (division), % (modulo).++ Autoincrement−− Autodecrement

Hence, in this case, it is concluded that the correct answer is "]."

The available options are:

a.+

b.-

c. *

d. ]

Learn more about Arithmetic Operator here: https://brainly.com/question/5973382

13) You notice that the row labels in your spreadsheet are 1, 2, 3, 8, 9.
Row labels 4 through 7 are missing. What could cause this?

Answers

Possible reasons for missing out row 4 to 7 are as follows,

Chance of rows from 4 to 7 contain incorrect/ non formatted data.Chance of rows from 4 to 7 are in hidden state.Chance of rows from 4 to 7 are assigned to some other user which does not belongs to your current user.Chance of rows from 4 to 7 were deleted from the sheet.

These are all the possible reasons for missing of row 4 to 7.

Learn more:  https://brainly.com/question/24504878

employees information system source code ..please ​

Answers

Answer:

def greetuser(username)

An ATM allows a customer to withdraw maximum amount of 500

Answers

Answer:

true

Explanation:

Algorithm:

Print "Enter the initial amount: $"
Get totalAmount

Repeat the following steps until totalAmount <= 0 or the user wants to exit
Get withdrawAmount

if withdrawAmount > 500
Print "You cannot withdraw amount of $500 per day."
otherwise
serviceCharge = 0

if withdrawAmount > 300
Find the serviceCharge as below
serviceCharge = (withdrawAmount - 300) * 0.04

Find the deductions as below
deductions = withdrawAmount + serviceCharge

if deductions > totalAmount
Print "Insufficient funds!"
Print "Allow with a service charge of $25? (Y/N): "
Get choice

if choice == 'y' or choice == 'Y'
Find the totalAmount as below
totalAmount -= (deductions + 25)
Print "Service charges: $" serviceCharge
Print "Additional charge: $25"
Print "Current balance: $" totalAmount
otherwise
Find the totalAmount as below
totalAmount -= deductions
Print "Service charges: $" serviceCharge
Print "Current balance: $" totalAmount

if totalAmount > 0
Print "Continue to withdraw? (Y/ N): "
Get choice;

if choice != 'y' and choice != 'Y'
Print "Current balance: $" totalAmount
Set repeat = false;

if totalAmount <= 0
Print "You should deposit an amount of money."

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

Complete Program:

#include
#include
using namespace std;

int main()
{
double totalAmount;
double withdrawAmount;
double deductions;
char choice;
bool repeat = true;

cout << "Enter the initial amount: $";
cin >> totalAmount;

while(totalAmount > 0 && repeat)
{
cout << "\nEnter an amount to withdraw: $";
cin >> withdrawAmount;

if(withdrawAmount > 500)
{
cout << "You cannot withdraw amount of $500 per day." << endl;
}
else
{
double serviceCharge = 0;

if(withdrawAmount > 300)
serviceCharge = (withdrawAmount - 300) * 0.04;

deductions = withdrawAmount + serviceCharge;

if(deductions > totalAmount)
{
cout << "Insufficient funds!" << endl;
cout << "Allow with a service charge of $25? (Y/N): ";
cin >> choice;

if(choice == 'y' || choice == 'Y')
{
totalAmount -= (deductions + 25);

cout << "Service charges: $" << serviceCharge << endl;
cout << "Additional charge: $25" << endl;
cout << "Current balance: $" << totalAmount << endl;
}
}
else
{
totalAmount -= deductions;

cout << "Service charges: $" << serviceCharge << endl;
cout << "Current balance: $" << totalAmount << endl;
}
}

if(totalAmount > 0)
{
cout << "\nContinue to withdraw? (Y/ N): ";
cin >> choice;

if(choice != 'y' && choice != 'Y')
{
cout << "Current balance: $" << totalAmount << endl;
repeat = false;
}
}
}

if(totalAmount <= 0)
cout << "You should deposit an amount of money." << endl;

cout << endl;
system("pause");
return 0;
}

Where is the option to set Conditional Formatting rules found?
O Insert tab in the Formatting group
O Page Layout tab in the Styles group
O Home tab in the Styles group
Formulas tab in the Formatting group

Answers

The answer is: C - Home tab in the Styles group.

Answer:

C

Explanation:

the person above me is correct, you should mark them brainliest

in excel If you have a lengthy text, adding a __________ can change the cell’s format to ________. *

Answers

Based on Microsoft Excel analysis, in excel If you have a lengthy text, adding a Wrap Text can change the cell’s format to high height.

What is Microsoft Excel?

Microsoft Excel is one of the software applications in Microsoft Office. It has cells of rows and columns in which users can easily put facts and figures to carry out tasks.

The function of Wrap Text

Wrap Text is applied in Microsoft Excel to show the cell contents on many lines instead of a single long line.

Hence, in this case, it is concluded that the correct answer is "Wrap Text and High Height."

Learn more about Microsoft Excel here: https://brainly.com/question/24749457

"""
Multiply.py - This program prints the numbers 0 through 10 along
with these values multiplied by 2 and by 10.
Input: None.
Output: Prints the numbers 0 through 10 along with their values multiplied by
2 and by 10.
"""
head1 = "Number: "
head2 = "Multiplied by 2: "
head3 = "Multiplied by 10: "
NUM_LOOPS = 10 # Constant used to control loop.
print("0 through 10 multiplied by 2 and by 10" + "\n")
# Initialize loop control variable.
# Write your counter controlled while loop here
# Multiply by 10.
# Multiply by 2.
print(head1 + str(numberCounter))
print(head2 + str(byTwo))
print(head3 + str(byTen))
# Next number.
Summary
In this lab, you use a counter-controlled while loop in a Python program. When completed, the program should print the numbers 0 through 10, along with their values multiplied by 2 and by 10. The data file contains the necessary variable declarations and output statements.
Instructions
Make sure the file Multiply.py is selected and opened.
Write a counter-controlled while loop that uses the loop control variable (numberCounter) to take on the values 0 through 10.
In the body of the loop, multiply the value of the loop control variable by 2 and by 10. Remember to change the value of the loop control variable in the body of the loop.
Execute the program by clicking the "Run Code" button at the bottom of the screen.

Answers


head1 = "Number: "
head2 = "Multiplied by 2: "
head3 = "Multiplied by 10: "
NUM_LOOPS = 10 # Constant used to control loop.

print("0 through 10 multiplied by 2 and by 10" + "\n")

# Initialize loop control variable.
# Write your counter controlled while loop here
# Multiply by 10.
# Multiply by 2.
x = 0
while(x<11):
print(head1 + str(x))
print(head2 + str(x*2))
print(head3 + str(x*10))
x += 1
# Next number.

Sergio has been asked to make a set of data that was once restricted now available to any users. What data type will Sergio apply to this set of data

Answers

The data type Sergio will apply to this set of data that was once restricted to become available to all users is: Public.

A database can be defined as a structured or organized collection of data that are stored on a computer system and usually accessed electronically.

A data type refers to the content of both structured and unstructured data while organizing them into categories based on specific criteria, especially for access or usage, easy retrieval, sorting, and storage by users.

In Computer and technology, the three (3) main data type with respect to restrictions on its access or usage are:

PrivateProtectedPublic

A public data is typically made up of variables that are visible and accessible to all classes or users.

In conclusion, Sergio should make the data a public data, in order to make them available to all users.

Read more: https://brainly.com/question/13889633

In the context of the data administration component of a database management system (DBMS), the acronym CRUD stands for _____.

Answers

CRUD is an acronym in database management system (DBMS) that stands for Create, Read, Update, and Delete.

CRUD is an acronym in database management system (DBMS) that stands for Create, Read, Update, and Delete. It is the four basic functions of persistent storage.

CRUD operations are foundation operations every database developer and administrator needs to understand.

Find out more on CRUD at: https://brainly.com/question/651396

Compare and contrast the android and windows operating systems

Answers

The main difference between Windows and OS X is the computer you can use it with. OS X is exclusively for Apple computers, commonly known as Macs, while Windows is basically for any personal computer from any company.

Question # 9
Multiple Choice
Which option best describes open source software?


a type of software that can be freely used and modified

a type of software that works well with almost all applications and drivers


a type of software used to sync up to Windows


a type of software used to bundle products together

Answers

Answer:

the first option is the best description for an OSS

Which of the following Access objects provides a user-friendly data entry method?
Select one:
a. query
b. table
c. form
d. report

Answers

Answer:

Table

Explanation:

Microsoft Access uses an object called a _____ to enter and organize data.

The answer is table.

why do you think mobile devices have CPUs that are less powerful than those in a larger desktop computer?

Answers

Mobile CPUs are found in laptops and are often slower than their desktop counterparts because they have to be more power-efficient and generate less heat. High power consumption and high heat generation can be a problem for a battery-powered laptop with a relatively small chassis

Mobile devices have CPUs that are less powerful than those in a larger desktop computer needs power as well as the device memory that was needed is not present.

What is CPU?

The central processing unit also known as CPU is an important part of the computer as it posses the part where the basic functions like taking actions, input or ouput etc. This all process needs high power and battery as well as storage.

For a battery excessive electricity utilization and significant temperature rise can just be problems. The CPU of a device cannot be powered at higher, continuous levels using such a little battery.

As a result, the most recent cellphone cannot compete with the performance of a top-tier desktop computer. the processor as well as the battery is needed for a CPU that can not be in mobiles.

Learn more about CPUs, here:

https://brainly.com/question/16254036

#SPJ2

What does it mean "Be Proactive"?

Answers

Answer:controlling a situation by making things happen or by preparing for possible future problems

Explanation:

Make things happen instead of waiting for them

match the following. dont answer if you dont know please.

Answers

Answer:

instructions= command

the background screen on a computer= desktop

an organized system= folder

list of commands= GUI

performing more then 1 task= multi tasking

an object that contains multiple files= dictionary

graphical user inference= menu

Explanation:

hope this help :)

Write a Boolean expression that tests if the value stored in the variable num1 is equal to the value stored in the variable num2.

Answers

Answer:

num1 = int(input("Enter value: "))

num2 = int(input("Enter value: "))

if num1 == num2:

   print("Equals.")

else:

   print("Unequal.")

Explanation:

The Boolean expression that tests if the value stored in the variable num1 is equal to the value stored in the variable num2 can be found in explanation.

What is boolean expression?

A logical statement that could be either true or false is referred to as a Boolean expression.

As long as both parts of the expression have the same basic data type, Boolean expressions can compare data of any type. Data can be tested to see if it is the same as, greater than, or less than other data.

A Boolean expression is a type of expression used in programming languages that produces a Boolean value when evaluated. A Boolean value can only be true or false.

The boolean expression for the given scenario can be:

num1 = int(input("Enter value: "))

num2 = int(input("Enter value: "))

if num1 == num2:

  print("Equals.")

else:

  print("Unequal.")

Thus, above mentioned is the program for the given code.

For more details regarding boolean expression, visit:

https://brainly.com/question/13265286

#SPJ5

What is it called when a unique letter is assigned to a shared drive

Answers

Answer:

Assigning a drive letter to a network drive is called mapping the drive, or linking the drive, by network nerds.

Explanation:

Identifies 3 different companies that use Information Systems. Then for each company describe the WHAT the company actually uses, the HOW the company uses it, and the WHY the company needs to implement this system within itself.

Answers

Three companies that use information systems:

IBM:

This company has been using an information management system for transactional and database operations. It was first used in 1968. Till then the system has gone through many modifications as per the changing requirements of the company. The information system used by IBM helps in defining structure for database, an organization for data, query management, database transactions, etc.

Olive:

This company uses a health-based information system. The information system used by this company aims at offering customers and users a regularly updated information base. They can access current research and technical documents. The content is in simple language and accessible in many locations. It gives a portal-like feature that is used to provide data published by experts, key researchers, findings, etc.

Catalyte:

The information system used by this company is a blend of high technology and a diverse workforce. They offer machine learning guided information systems to train candidates, speed up their performance, and generate quality results. Their information systems offer new career options as well as opportunities to develop software using various forums, communities, etc.

The companies that use Information Systems are

Amazon IBMRRE Ventures

How does Ama.zon use information systems?

Ama.zon uses  information systems in a  lot of its business processes as it helps them to have good and improved efficiency in the the area of collection, storage, and analytics of all their customers' information.

Conclusively, IBM uses the information system for:

Keeping of customers information.communicating.Buying and selling etc.

Learn more about  Information Systems from

https://brainly.com/question/14688347

Other Questions
Which sentence has grammatical or spelling errors?If we find that we should've shipped your order sooner, you'll be eligible fora full refund.When they finished eating, all of the boy's faces were covered in tomatosauce. ( ) , , ' , ', ' , , , - 3 , , , 31 Rewrite each sentence below using a direct object pronoun.Miro las noticias todos los das. ____________________. help please dilations geometry Find the marked price if: Selling price =Rs 4999.50 and Discount percentage = 10%. Which of the following best describes one serving of Vegatables What is the approximate value of log b to the nearest hundredth? 0.93 1.23 9.16 65.53 PLZ HELP!! ASAP PLZ!! NO FILES. Please help me i dont understand this question at all. I WILL GIVE 20 POINTS! Solve for x. Mary has been asked to rank her preferences between three baskets of goods, X, Y, and Z. If Mary prefers Y to Z but does not care if she gets X or Y, then:______.a. Z is on a lower indifference curve than X.b. Y and Z are on the same indifference curve.c. X is on a higher indifference curve than Y. Mary is indifferent between baskets X and Y. Therefore, these two points must be on the same indifference curve.d. Y is on a higher indifference curve than Z but it is impossible to determine whether Z is on a higher, lower, or the same indifference curve as X. Find the measure of the indicated angle to the nearest degree -6>t-(-13)slove for the inequality in the prince machiavelli argues that leaders maintain power through "Now we're gonna discuss the thing what I said earlier"or"Now we're gonna discuss the thing I said earlier" is adding "What" to the first phrase after 'thing' makes any difference??? Nick sees a commercial for a Brand X clothing company that depicts the wearers of the clothes out having a good time with friends. Although he doesn't particularly need new clothes, the commercial prompts him to buy a Brand X t-shirt. This illustrates a common.......... of advertising. A product's target market is part of which of the 4 P's of marketing? The liver develops: as a ventral outgrowth of the embryonic foregut. incorporates both endodermal and mesodermal components. develops in the ventral mesentery. is connected to the stomach by the lesser omentum. All of the above. wiftys Shop can make 1000 units of a necessary component with the following costs: Direct Materials $28000 Direct Labor 6000 Variable Overhead 3000 Fixed Overhead ? The company can purchase the 1000 units externally for $43000. The unavoidable fixed costs are $2000 if the units are purchased externally. An analysis shows that at this external price, the company is indifferent between making or buying the part. What are the fixed overhead costs of making the component? If you were driving the blue Prius in the situation pictured above, explain why the red Mustang should be given right-of-way at this intersection.