Which of the following are benefits of well-named variables? Select two answers.

Answers

Answer 1

Options:

(a) The program will be easier to read.  

(b) The program will run faster.

(c) The program will be easier for others to debug.

(d) The program will use less resources.

Answer:

(a) The program will be easier to read.  

(c) The program will be easier for others to debug.

Explanation:

Naming variables properly is an essential thing to do when writing programs or even developing software applications. This involves making use of descriptive and logical names when declaring variables.

For example, to store the age (say 67) of a user in a variable, the following ways are possible:

i. $x = 67

ii. $name = 67

iii. $age = 67

From (i), simply using $x = 67 does not exactly tell that 67 is the age of some user. That makes it a bit difficult to understand the code.

Also, from (ii), using $name = 67 is quite misleading. The variable name $name already depicts that the variable should store the name of some sort. However, a number is supplied. This is not a good way of naming variables.

The third option, from (iii), however clearly depicts the intention of the line of code without having to think too much. This is a well-named variable.

In general, well-named variables;

(i) makes it pretty easy to read and thus understand the lines of code in a program

(ii) following from (i), makes it easier for other programmers to be able to debug such program.

Well-named variables however have nothing to do with the speed of the execution of the program neither do they have anything to do with the amount of resources that will be used by the program.


Related Questions

Expansion is usually considered a good thing. Why did expansion often promote problems in the American colonies?

Answers

Answer:

Moving over and problems with native settlers

Explanation:

4(8+2*5-6) Whats the Answer? ​

Answers

Start with multiplication in parentheses. 5(2) = 10 and then add and subtract to get 12 in the parentheses. then multiply by 4 to get 48

Answer:

48

Explanation:

We are given the expression:

4(8+2*5-6)

We want to solve. Be sure to follow PEMDAS: Parentheses, Exponents, Multiplication, Division, Addition and Subtraction.

First, multiply 2 and 5 inside the parentheses.

4(8+ (2*5) -6)

⇒ 2*5=10

4(8+10-6)

Next, add 8 and 10.

4( (8+10) -6 )

⇒8+10=18

4(18-6)

Next, subtract 6 from 18.

⇒18-6=12

4(12)

Finally, multiply 4 and 12

48

4(8+2*5-6) when solved is equal to 48

What are some good study hacks for college frehsman in the fall

Answers

Answer:

Have a planner/calendar. College is much harder than highschool (but that also depends on what college you go to). Color coding dates depending on importance could help you stay organized and focused on the homework you need to do first.

Answer:

Set a weekly planner and set the date for all your assignment and class works and vacation and other trips

Explanation:

which statement is an example of a smart, healthy choice

Answers

Answer:

Other examples of SMART goals include: If you want to eat more fruit: “I will eat one piece of fruit at breakfast three times this week.” If you are just starting to eat more fruits and vegetables: “I will eat one fruit or vegetable from the green, orange, and red groups this week

Please include an attachment for the answer choices and I’d be happy to help

Which region of the vertebral colum is immediately superior to the lumbar region

Answers

I believe it is the thoracic region
Key jehd JSU’s heius heius heius heius hehhe heius hehhee


How do mycorrhizae influence plants?

Answers

Mycorrhizae is a association between plants,fungi and roots

Answer:

Mycorrhizae are a symbiotic association between plant roots and fungi. By differentially altering the performance of individual species within the community, mycorrhizae can influence plant community composition, enhance competition, and create synergism through the sharing of resources between species.

Explanation:

b) You are preparing to give a speech on a topic and realize that you have lost the citation information for one of your important sources. You can’t seem to find this source again. What would you do to ethically prepare for the speech?


Answers

Explanation:

Ethics is a very important part in our daily lives. Ethics plays a vital role in a public speaking situation. An ethical public speaker should always be honest and should avoid plagiarism by taking his notes during the research process, identifying the sources, and ten deciding when it is suitable to cite the sources.

The ethical public speakers also also cite the sources properly by understanding how to paraphrase and then directly quote the sources.

In the context, if I lost the citation information for an important source for my  speech, I will paraphrase the information and avoid plagiarism and as an ethical speaker I will mention that the abstract has been taken from an external source but the citation information was lost.

Which of the following best summarizes the attitude toward religious beliefs expressed in this document?
(A) All individuals should be free to believe or not believe in God as they wished
(B) Religion was a personal matter that the government should not try to influence
(C) Christians should be able to practice their faith without fear of
persecution
(D) The colony should be reserved for the one specific type of Christianity approved by the local government officials

Answers

(A)? I’m not really good on this subject haha

True or false: Changes that occur at puberty affect only the physical aspects

Answers

Answer:

false

Explanation:

Who is least likely to vote in the next presidential election?

Answers

Answer:

78

Explanation:

Some one I’m not sure

answer this if you know its true: we are ALL just using this to get through online school during corona lol

Answers

Answer:

Yes, this is very true lol

Explanation:

Because some people need help with their assignments and this is a website to help them :)

Yessssssssssssssssssssss

What term describes the moon's path around Earth?
eclipse
phase
revolution
rotation

Answers

Answer: C - revolution

Explanation:

The term that describes the moon's path around Earth is revolution. The correct option is C.

What is moon's revolution?

The Moon revolves around the Earth in a circular motion known as revolution.

This is analogous to the Earth's revolution around the Sun. The path that the Moon takes to orbit the Earth is referred to as its orbit. The Moon takes about 27 days to complete one orbit around the Earth.

Because of the Moon's 27-day orbit around the Earth, the times of high and low tides change. The Sun also plays a role. The Sun's influence on tides is roughly half that of the Moon's.

The moon does not appear to be spinning and appears to be almost perfectly still to observers on Earth. This is referred to as synchronous rotation by scientists.

Thus, the correct option is C.

For more details regarding moon's revolution, visit:

https://brainly.com/question/12192058

#SPJ5

Why are theories and hypothesis important in pcychology? Why do we need replicate studies that have been conducted?

Answers

Answer:

A theory is more than simply an idea because the idea itself forms the hypothesis that in turn is used as the context for the experiments, tests, and gathering evidence that will go to prove or disprove the initial hypothesis. A theory then is the positive benefits of proof and evidence and is the proven outcome of the subject of the hypothesis.

Explanation:

What elements of Tobias Wolff life were also reflected in his stories?

Answers

Answer:

Many of Tobias Wolff stories and books reflected his time and experience in Vietnam where he served in the military as a paratrooper during the Vietnam War.

Can you think of another example in history where an empire was broken into smaller chunks like the Khanates of the Mongol Empire?

Answers

Answer:

Another historical example in which a great empire was dissolved between several territorial entities of much smaller size and hierarchy is that of the Western Roman Empire, which controlled most of the European territory until its dissolution in the year 476, when its domains were divided between various kingdoms and minor entities as a consequence of the conquest of Rome by the barbarians.

After the dissolution of the Roman Empire, Europe began a period of feudalism, where feudal lords controlled small territories within larger kingdoms, holding royal power and forming their own armies. Thus, for example, within the kingdom of the Visigoths, formed after 476, several strong men were vying for power, in turn controlling smaller regions of the kingdom.

Western Roman Empire, which controlled most of the European territory until its diussloution, when its domains were divided between various kingdoms  as a consequence of the conquest of Rome by the mongols.


It has become rather easy for people to have access to and use of a debit card. How does a person avoid unnecessary fees that can be associated with getting money from the checking account that is attached to the card?

A) Only using the ATMs that are located at convenience stores.
B) Pull out more money than you need every time you use the card.
C) Only using the ATMs that are associated with the bank account.
D) Only using ATMs that have the same symbols on the machine as on the card.

Answers

Answer:

C

Explanation:

Only use the ATM that is associated with the bank account. Most banks do not charge a fee to use their ATMs. Some stores and other ATMs charge a fee to pull out extra money or to use their machines. The symbols on the cards just represent the system that the card uses, not fees associated with the card.

We are required to find a way in which a person can avoid unnecessary fees that can be associated with getting money from the checking account that is attached to the card.

The way in which way in which a person can avoid unnecessary fees that can be associated with getting money from the checking account that is attached to the card is "Only using the ATMs that are associated with the bank account".

Debit cards are issued by the bank to an account holder in order to make withdrawal and make payment.

When making payments or withdrawal from a bank not associated with your bank, you will be charged some unnecessary fees. This could be avoided by making transactions in the bank associated with your debit card.

Therefore, the way in which way in which a person can avoid unnecessary fees that can be associated with getting money from the checking account that is attached to the card is "Only using the ATMs that are associated with the bank account".

Read more:

https://brainly.com/question/21852823

Is this an argument? Cutting the interest rate will have no effect on the stock market this time round as people have been expecting a rate cut all along. This factor has already been reflected in the market.

Answers

Yes it is an argument

which statement is an example of a smart, healthy choice

Answers

Answer:

An example of a smart and healthy choice is to replace a breakfast consisting of sweets, coffee with sugar, and white bread with jams with a much leaner breakfast consisting of coffee with sweetener, fruits, and ham and cheese omelet.

In this way, a meal high in glucose, fats and simple carbohydrates, which together tend to make the person fat and increase cholesterol, would be replaced by a much leaner diet, without added sugars, with seasonal fruits and protein, which together provide the necessary nutrients to start the day with energy and a healthy and balanced diet.

Answer:

At least half of your grains should be whole grains.

Choose lean meats over high-fat meats.

Explanation:

Suppose a fox in a food web feeds only on rabbits, squirrels, mice and birds, all of which feed exclusively on plant material. Assuming that a fox’s daily caloric requirement is 800 kcal, and that only 10 percent of the energy at one trophic level can be passed to the next trophic level. How many square meters of plant material are required to support the fox, if the net primary productivity of the plant material is 8,000 kcal/m2/yr? Hint: draw the food chain to determine how many kcal/m2/yr the fox receives to determine how much land he needs and remember the 10% rule!

Answers

Answer:

square metres of plant materials required to support the fox = 3650 m²

Explanation:

From the given information:

the daily caloric requirement of the fox = 800  

In a year, we have = 800 kcal × 365 /year = 292,000 kcal/year

Also, only 10% of the energy at a particular trophic level can be passed onto the next.

the net productivity of the plant material = 8000 kcal/m²/yr

So, using 10% of energy at a particular level, the fox only need 80 kcal/m²/yr

The objective is to determine in square meters, how many materials are required to support the fox.

square metres of plant materials required to support the fox = [tex]\dfrac{292,000}{80}[/tex]

= 3650 m²

Which packaging material should food packagers avoid using?

Answers

Answer:wax and recyclable

Explanation:

Food packagers should avoid using wax-coated packaging materials, because it is not recyclable.

Other Questions
HELP PLEASESimon is presenting a project on scientific laws and theories. Which of the following statements should he include to explain the differences between the two? A. Scientific theories requires scientific evidence but scientific laws do not.B. Scientific theories are based on observations and scientific laws are based on opinions.C. Scientific theories explain why something happens, and scientific laws describe what happens.D. Scientific theories are rarely changed and scientific laws are modified frequently Garrett answered 90% of 40 test problems correctly.How many problems did Garrett get wrong Which amount best reflects operating income? Enter your answer in millions without commas or dollar signs. if the sides of a triangle are produced in order prove that the sum ofexterior angles so formed is equal to four right angles QUICK I HAVE A SCIENCE PROJECT DUE AND I CAN'T FIND THE ANSWER ANYWHERE: how much does a lemon grow in a week? Verify that (x)=2(1cex), where cis an arbitrary constant, is a one-parameter family of solutions to dydx=y(y2)2.Graph the solution curves corresponding to c=0,1,2using the same coordinate axes. Solve the inequality. Graph the solution |2x+7|>23 Desmond is 8 inches taller than Niki. If we let y represent Niki's height in inches, write an algebraic expression for Desmond's height. 1. 2(4x - 3) - 8 = 4 + 2xCan sb help slove this using PEMDAS ? The sum of two odd numbers is even Can you assume intersection of lines from a diagram Tried and Trues accountant suggests that monthly rent and hourly wage rate also be factored into the productivity calculations. Annandale pays the highest average wage at $10 an hour. Blacksburg pays $7.25 an hour, Charlottesville $8, and Danville $7.50. The cost to rent store space is $2800 a month in Annandale, $1200 a month in Blacksburg, $2000 a month in Charlottesville, and $800 a month in Danville.a. Which store is most productive?b. Tried and True is not sure it can keep all four stores open. Based on multifactor productivity, which store would you close? What other factors should be considered? 9x - 6xy + 9 + 9xy - 6yHELPP A reader must analyze and interpret evidence of the _____ of the authorial voice carefully in order to determine the narrative reliability of the text. PLEASE HELP THIS IS URGENT!! TvT trustworthiness mood sound frequency The skid marks left by the decelerating jet-powered car The Spirit of America were 9.60 km long. If the car's acceleration was -2.00 m/s2, what was the car's initial velocity. Which of the following documents was the first in limiting the power of the king of England? What might have shocked readers about Dickinsons view of spirituality? Q:Resolve this into partial fraction.9/(X-1)(X+2)^2 True or False and your reasoning : Corona-virus is a bacteria that affects ones immune system, causing illness. During a biology lab, students use a small knife called a scalpel to examine a large cricket. One student is accidentally cut by the scalpel. Which steps must be taken to ensure this student's safety? quickly yelling to the lab instructor putting on gloves before treating the cut using disinfectant on the cut applying a bandage immediately calmly telling the lab instructor washing hands after treating the cut