Which of these is a programming best practice?
Use general variable names such as V1 and V2.
Use lots of comments in the code.
Make lines of code as long as possible.
If you need to repeat a function, paste a copy of it each time you need it.

Answers

Answer 1

Answer:

B

Explanation:

You should question C. That looks like a very poor practice, but sometimes it can't be helped. Try and make short lines

D also looks questionable. You'll wind up with pages and pages of code. A better practice is to create subroutines (functions and procedures in the language I use) and then learn how to pass parameters.

A is not a good idea either because if you look at the code a month later, chances are you won't know the difference between v1 and v2.

The best answer is B. But how many programmers do it?

Answer 2

Answer:

B. use lots of comments in the code

Explanation:


Related Questions

Design a TestScores class that has fields to hold three test scores. The class should have a constructor, accessor and mutator methods for the test score fields, and a method that returns the average of the test scores. Demonstrate the class by writing a separate program that creates an instance of the class. The program should ask the user to enter three test scores, which are stored in the TestScores object. Then the program should display the average of the scores, as reported by the TestScores object.

Answers

Answer:

Answered below

Explanation:

class TestScores {

double test1;

double test2;

double test 3;

public TestScores (double test1, double test2, double teat3){

this.test1= test1;

this.test2 = test2;

this.test3 = teat3;}

//mutator

public setTest1(double test1){

this.test1 = test1;

}

//accessor

public double getTest1(){

return test 1;

}

//Write same accessors and mutators for test2 and test3

public double getTestAverage(){

double sum = test1+test2+test3;

return sum / 3;

}

}

class TestRun{

public static void main (String [] args){

TestScores scores = new TestScores(50.5, 40.0, 80.7)

int average = scores.getTestAverage();

System.out.print(average);

}

Which of the following tasks can you perform using a word processor?

insert a bulleted list in a document
check a document for spelling errors
edit a video for inclusion in a document
create an outline of sections to be included in a document
set a password to restrict access to a document

Answers

Answer:

check a document for spelling errors

Explanation:

With a word processor, you can easily edit and make changes to a document, move text around in a document, add images, change fonts, check for spelling errors

One of the differences between a career and a job is that a career?

Answers

A job is more short-term oriented and tends to focus purely on earning money. ... On the other hand, a career is a series of related employment in one field that provides experience for your future and helps you earn a better paycheck and living status.

Answer:

B. provides better pay.

Explanation:

it was right

Write a program in Java that asks the user to enter four weighted assessment grades, calculate the average, then display the average with the message: "Student Pass" if the average is greater than or equal 60 or the message "Student Fail" otherwise. The details of the assessments and weights are as follow: Homeworks: 20% Labs: 15% Midterm: 25% Final: 40%

Answers

Answer:

Explanation:

In order to calculate the weighted average, the grade itself is multiplied by the percentage of the category and then these values are summed. This sum is then divided by the total percentage of the portfolio.

import java.util.Scanner;

class Main {

   public static void main(String[] args) {

       double sumOfWeights = 100;

       

       

       Scanner in = new Scanner(System.in);

       

       System.out.println("Please Enter Homework Grade: ");

       double homework = in.nextDouble() * 20;

       System.out.println("Please Enter Labs Grade: ");

       double labs = in.nextDouble() * 15;

       System.out.println("Please Enter Midterm Grade: ");

       double midterm = in.nextDouble() * 25;

       System.out.println("Please Enter Final Grade: ");

       double finals = in.nextDouble() * 40;

       

       double average = (homework + labs + midterm + finals) / sumOfWeights;

       System.out.println("The Average of these Weighted Grades is " + average);

   }

   

}

A testing lab wishes to test two experimental brans of outdoor pain long each wiil last befor fading . The testing lab makes six gallon s of each paint to test. The resultare Shown to see how

Answers

Answer:

The answer is "[tex]\bold{Brand \ A \ (35, 350, 18.7) \ \ Brand \ B \ (35, 50, 7.07)}[/tex]"

Explanation:

Calculating the mean for brand A:

[tex]\to \bar{X_{A}}=\frac{10+60+50+30+40+20}{6} =\frac{210}{6}=35[/tex]

Calculating the Variance for brand A:

[tex]\sigma_{A}^{2}=\frac{\left ( 10-35 \right )^{2}+\left ( 60-35 \right )^{2}+\left ( 50-35 \right )^{2}+\left ( 30-35 \right )^{2}+\left ( 40-35 \right )^{2}+\left ( 20-35 \right )^{2}}{5} \\\\[/tex]

     [tex]=\frac{\left ( -25 \right )^{2}+\left ( 25 \right )^{2}+\left ( 15\right )^{2}+\left ( -5 \right )^{2}+\left ( 5 \right )^{2}+\left ( 15 \right )^{2}}{5} \\\\ =\frac{625+ 625+225+25+25+225}{5} \\\\ =\frac{1750}{50}\\\\=350[/tex]

Calculating the Standard deviation:

[tex]\sigma _{A}=\sqrt{\sigma _{A}^{2}}=18.7[/tex]

Calculating the Mean for brand B:

[tex]\bar{X_{B}}=\frac{35+45+30+35+40+25}{6}=\frac{210}{6}=35[/tex]

Calculating the Variance for brand B:

[tex]\sigma_{B} ^{2}=\frac{\left ( 35-35 \right )^{2}+\left ( 45-35 \right )^{2}+\left ( 30-35 \right )^{2}+\left ( 35-35 \right )^{2}+\left ( 40-35 \right )^{2}+\left ( 25-35 \right )^{2}}{5}[/tex]

    [tex]=\frac{\left ( 0 \right )^{2}+\left ( 10 \right )^{2}+\left ( -5 \right )^{2}+\left (0 \right )^{2}+\left ( 5 \right )^{2}+\left ( -10 \right )^{2}}{5}\\\\=\frac{0+100+25+0+25+100}{5}\\\\=\frac{100+25+25+100}{5}\\\\=\frac{250}{5}\\\\=50[/tex]

 Calculating the Standard deviation:  

[tex]\sigma _{B}=\sqrt{\sigma _{B}^{2}}=7.07[/tex]

According to the narrator of "EPIC 2015, in 2015, "news" is:
A. fed to a monitor in all homes and is required to be on at all times.
B. provided by hard-working journalists who are committed to truth.
C. reorganized and combined with other information for individuals.
D. created by apathetic journalists who care little how true a story is.

Answers

Answer:

D created by apathetic journalists who care little how true a story is.

Explanation:

D

Based on the narrator of "EPIC 2015, in 2015, "news" is reorganized and combined with other information for individuals.

What is a reorganization?

The term  reorganization connote a vital and disruptive way that is used to restore a troubled business or any other thing to ensure its usefulness. It can be through the act of shutting or through the act of replacement, etc.

Conclusively, using the narrator point of view as written in "EPIC 2015, in 2015, "news" as said to have been reorganized and there was a combination of news with other information for people.

Learn more about narrator from

https://brainly.com/question/1934766

If your query is 'michael kors women's handbags' and the Product Ad shows 'Womens Burlington handbags', What should be your rating? A) Bad B) Fair C) Good D) Excellent

Answers

My rating would be C) Good, it recommended me a similar handbag, good algorithm but not excellent because it’s not what I was looking for

Write a Python program that prints all the numbers from 0 to 6 except 3
and 6.
Note : Use 'continue' statement.
Expected Output : 0 1 2 4 5

Answers

Explanation is in the file

tinyurl.com/wpazsebu

who wants to trade ro^lox accounts

Answers

make me brainlestttt please and thank you and the answer is no

What is "public static grossPay()" an example of?



A) Method()


B) Literal()


C) Private()


D) Order()

Answers

Answer:

A) Method()

Explanation:

This is an example of a Java method header. It has the visibility modifier called public which makes it visible to other classes. It is a static method which means it can be only be called through the Class's name because an object instance of it cannot be created. It is named grossPay and has no parameters and does not return any type.

Can someone help me with solving this program using coding?

Answers

Answer:

Explanation:

The following program is written in Python and holds all of the powers and amounts in a dictionary called inventory which can be changed, or the values can be increased like any dictionary. The data is then called and outputed to the user as an Inventory like the one shown in the picture.

def Inventory():

   inventory = {'Mushroom': 5, 'Super Bell': 5, 'Boomerang': 5, 'Fire Flower': 5}

   print("Mario's Inventory")

   print("Power            Amount")

   for x in inventory.keys():

       spaces = ''

       for y in range(20 - len(x)):

           spaces += " "

       print(x + spaces + str(inventory.get(x)))

Inventory()

The first form of the rocket is believed have been developed in _?
China
Germany
Greece
Poland
i will mark u brainliest mf

Answers

China in 1100 AD, if I am wrong I'm sorry.

Answer:

Greece

Explanation:

It is believed that the reaction principle, the physical law of rocket motion, was first demonstrated about 360 B.C. by a Greek named Archytas. Far from demonstrating the reaction principle in a weapon, Archytas simply filled a hollow clay pigeon with water. He then suspended the clay pigeon by string over a fire. The heating of the water produced steam, and the clay pigeon could move under its own power as steam escaped through strategically placed holes. Archytas could hardly have imagined that the same basic principle would one day carry men to the Moon.

Most wires are covered in rubber to insulate them and keep people safe from electricity and heat true of false

Answers

Answer:

I think it is true...

Explanation:

Hope its right

Why is malware dangerous

Answers

Malware can be hugely damaging to businesses as well as individuals. Hackers often use malware to try and gain entry into an organisation's systems or networks, from where they can access valuable data to steal and sell on.

Answer:

Malware can be hugely damaging to businesses as well as individuals. Hackers often use malware to try and gain entry into an organisation's systems or networks, from where they can access valuable data to steal and sell on.

Explanation:

HELP MY TABLET KEEPS ON REBOOTING I TRIED TO FACTORY RESET BUT IT KEEPS ON REBOOTING

Answers

Answer: try to restart It

Explanation:Random reboots can happen because of problems with the firmware, but can also be due to some app you installed that is making the system unstable, or perhaps some bad bit of data that is in the system cache. A corrupt SD card can also cause problems.

Answer: it most likely a thrid party app that is causing this

Explanation: Random restart problems are sometimes caused by a bad third party app. To check if that's the case here, try running your tablet on safe mode and observe. If it works normally and won't restart on safe mode for some time, that can mean that an app is causing the trouble.Mar 6, 2021

Help!!!!!!
please
Who will give the answer I'll mark him/her as brainlist..​

Answers

17, 12.5, 6, and 10. HOPE THIS HELPS

What is a conflict?
Contentment
Disagreement
Harmony
Peace-keeping

Answers

Answer:

conflict is a Disagreement

I need help please and thank you

Answers

Answer:

Explanation: For "BEST way to handle the situation," try Option 1, because it would possibly help them or make the Technical Support Representative do less work.

For "WORST way to handle the situation," Option 4 would be the best because you're basically just hanging up on the person.

Website managers use____ every day.

Answers

Answer:

technology

Explanation:

Answer:

uses a coena for his computer association

In the Business world people are often measured by their???
A- soft skills
B- hobbies
C- iq
D- technical skills

Answers

Answer:

D

Explanation:

You need skills to succeed!!

Answer is D !!!!!!!!

Which tag is responsible for changing the text located in the tab of a web browser or when bookmarking a web site?
A.
B.
C.
D.

Answers

Answer:

d

Explanation:

Sharon wants to include her name on each slide in her science presentation. Where in the Header and Footer dialog box would she type her name?

Answers

Answer:

She will type her name in the Footer

Explanation:

To answer this question, I will assume Sharon is using the Microsoft Office PowerPoint package to handle her presentation.

In PowerPoint, the footer helps users to add names or any other details on every slide.

To do this:

Go to INSERT in the menu barThen, go to Text menuSelect Header & Footer to open the boxCheck the Footer optionEnter the text in the provided text box(This is where Sharon will enter her name)Lastly, click Apply to All to effect the changes

1.Menciona tres factores o variables que consideras influirán en el oscurecimiento del alimento cortado o pelado expuesto a la intemperie

Answers

La respuesta correcta para esta pregunta abierta es la siguiente.

A pesar de que no se incluyen opciones o incisos para responder a la pregunta, podemos comentar lo siguiente.

Los tres factores o variables que considero influyen en el oscurecimiento del alimento cortado o pelado expuesto a la intemperie son los siguientes.

1.- La exposición al elemento "oxígeno" cuando están a la intemperie.

2.- La temperatura del medio ambiente que afecta directamente al alimento.

3.- Los minerales y los metales que constituyen al alimento cuando tienen contacto con el medio ambiente.

En estos momentos, las sustancias que componen al alimento comienzan a tener reacciones químicas y se empiezan a oxidar cuando permanecen abiertas a temperaturas ambiente.

Es por eso que los expertos recomiendan que una vez abierta la comida -la fruta, la verdura- tiene que refrigerarse lo más pronto posible para poderse conservar un poco más de tiempo.

Guys pls help me!!!!!!!!

Answers

Answer:

Rocky The Mountain Lion

Explanation:

The most generously compensated mascot in the pro athletics industry is the NBA's Rocky, as indicated by Sapling. The Denver Nuggets mascot makes more than 10 times the normal compensation for an elite athletics group mascot with a compensation of $625,000. Rocky was accepted into the Mascot Hall of Fame in Whiting, Indiana, in 2006.

What is the author's purpose for writing this article? A to persuade readers to consider a career in aerospace engineering and at NASA B to caution readers about the difficulties that aerospace engineers encounter C to highlight the experiences of Tiera Fletcher growing up and as an aerospace engineer D to promote Tiera Fletcher's book and her nonprofit organization, Rocket With The Fletchers

Answers

Answer:

C to highlight the experiences of Tiera Fletcher growing up and as an aerospace engineer

Explanation:

Dream Jobs: Rocket Designer, a Newsela article by Rebecca Wilkins was written with the intent of informing the readers of how Tiera Fletcher developed a love for mathematics at an early age and further developed a desire to be a Space Engineer which she succeeded at. She highlighted the different steps she took before she realized her goal. Some of these steps included working as an intern in several space establishments and performing research.

Today, she is very successful in her career and hopes  that young ones can pursue a career in any STEM careers of their choice.

Answer:

c on newsella

Explanation:

Can someone please answer these, I'm tired of wasting points on questions that no one answers.

Describe the respective benefits of participatory design and contextual design, with examples of situations in which each might be preferred.

Outline which activities involve mathematical reasoning skills..

Explain the most appropriate methods to use in designing a product for the user in the following scenario, including aspects of the user interface that might need special attention.
Situation: A researcher approaches a designer with a request for a computer interface that will allow the evaluation of the ways children process spatial relationships and the various changes as they learn and develop. The computer interface will not have to perform any task but to play visual spatial games, recording and analyzing all elements in how children between the ages of 2 and 5 manipulate visual objects on a screen.

Answers

What format do you need it in?

What is the purpose of the website directory provided by the website host?

A. to look up user account information
B. to provide help and training for new customers
C. to store all of a website’s content files
D. to archive website usage logs

Answers

Answer:

mabye A

Explana

.

.

.

PLEASE HELP ASAPP!!

What is an online presence.

This is for my cyber foundation, so i guess computers and technology is similar.

Answers

Answer:

Online presence management is the process of presenting and drawing traffic to a personal or professional brand online.

Explanation:

if the tax percent is 15% and tax is $36 and percent discount is 10, what is the cost price?​

Answers

$36.26 because tax is $4.40 and the discount would be $4.14 | so 40-14 is 26

Which of the following statements represents a scientific bias?


Clean all containers to remove residue from the previous steps.

Use data from the previous steps because they show better results.

Make sure to follow every step in the procedure.

The scale needs to be calibrated to ensure accuracy.

Answers

Answer: Use data from the previous steps because they show better results

Explanation:

A scientific bias occurs when there's a deviation between the observations of a researcher and the accurate representation of data and results.

In this case, the use of data from the previous steps because they show better results will bring about a data bias as it'll lead to inaccuracies of the data being represented.

Other Questions
Triangle A B C is shown. Angle B C A is a right angle, angle C A B is 30 degrees, and angle A B C is 60 degrees. The length of side A B is 16, the length of B C is 8, and the length of A C is 8 StartRoot 3 EndRoot. What are the input and output values for determining the sine of 60? input: StartFraction 2 Over StartRoot 3 EndRoot EndFraction; output: 60 input: 60; output: StartFraction StartRoot 3 EndRoot Over 2 EndFraction input: 60; output: StartFraction 2 Over StartRoot 3 EndRoot EndFraction input: StartFraction StartRoot 3 EndRoot Over 2 EndFraction; output: 60 More people were killed in air raids than from the two atomic bombs but it was the atomic bomb that was condemned. Why do you think this is? I would appreciate it if you could answer! Will give brainliest if its right!! Which statement is not true about the pattern shown? 2/3 4/6 8/12 16/24A-Each fraction is greater than the previous fraction.B-Each fraction is equal to the previous fraction in the pattern multiplied byC-Each fraction is equivalent to 2/3D-The next fraction in the pattern is 32/48 Question 4 of 10Mark Twain quoted Napoleon as saying, "Tte d'arme" (Head of the army) inorder to:O A. further explain a difficult idea.B. support a minor point.C. suggest what other great men should say.D. give an example of a great man's dying words. Which statements about the election and terms of service of Louisiana congressional members are correct? Check all that apply.Senate members serve two-year terms and may choose to run for reelection.After three terms, they must wait at least one term before running for the same seat.Congressional elections are held every four years during odd-numbered years. Members can serve up to four back-to-back terms in the same office. House members serve four-year terms and may choose to run for reelection. The credit scores of 35-year-olds applying for a mortgage at Ulysses Mortgage Associates are normally distributed with a mean of 600 and a standard deviation of 125. (a) Find the credit score that defines the upper 20 percent. (Use Excel or Appendix C to calculate the z-value. Round your final answer to 2 decimal places.) Credit score (b) Eighty-five percent of the customers will have a credit score higher than what value Why didn't the Spanish let Americans use the Mississippi river to travel? Rama threw a paper airplane 30 times. It landed right side up 12 times and upside down 18 times. If this pattern continues and Rama throws the paper airplane one more time. What is the probability it lands right side up Im stuck on this one- sorry if Im annoying lol PROFESORA Sara, por qu ests tan triste? Tienes algn problema?SARA No, profesora, es que mi mam se enoj conmigo esta maana porque tir (threw away) unos papeles al suelo cuando caminaba por la calle.PROFESORA Sara, seguro que tu mam slo te dice que no lo hagas para que (1) 1 of 10saber lo importante que es mantener (maintain) limpia la ciudad.SARA Pero eran slo unos papeles...PROFESORA Mira, Sara, te voy a contar una cosa antes de que (2) 2 of 10 demasiado tarde. Te acuerdas cuando jugbamos en el parque de los pjaros?SARA S, por qu ya no vamos all?PROFESORA Pues, los pjaros necesitan que (3) 3 of 10 agua limpia en el lago para beber. Tambin es importante que ellos (4) 4 of 10 rboles para vivir. Y sobre todo, es necesario que ellos (5) 5 of 10 un espacio libre.SARA Y en el parque no tienen esas cosas?PROFESORA Ahora no. Las personas contaminaron toda el agua del parque y por eso los pjaros ya no (6) 6 of 10 all.SARA Y no hay policas para que la gente no (7) 7 of 10 el parque?PROFESORA Los policas no (8) 8 of 10 tener esa responsabilidad. sa es una responsabilidad de todas las personas. Por eso, es importante que t (9) 9 of 10 con tus amigos y les expliques que es necesario que ellos tambin (10) 10 of 10 por ayudar a nuestros amigos los pjaros. Lenny took three of his textbooks home one night. He wanted to find how much his backpack weighed.Which of these units is MOST appropriate for measuring the weight of Lennys backpack? In the section of "Forests on Fire" entitled "The Human Factor," the author contrasts naturally occurring forest fires and fires caused by malice and mistakes. How is the forest fire different when it is caused by malice or a mistake? A. Firefighters are more likely to put out these fires. B. These fires are less likely to get out of control. C. These fires could cause a large amount of damage because they were not caused by nature. D. Animals do not generally live where these fires take place. I really don't know how to solve this because when you plot points there's usually only 2 points to plot not 3. what is the bottom and what is the frequency??? A football player ran for 11 yards. how many inches did the football player run? TINUSATP is an abbreviation for adenosine triphosphate, a complex molecule that contains tphosphates. It is the energy currency of the cell. ATP is used by organisms as energy...ththat require energy.Which statements regarding the ATP-ADP cycle are true?ATP synthesis takes place in the mitochondria of eukaryotic cells. Why was Mars orbiter sent to mars? An alpha particle is composed of He2+ ions?true or false Mason makes $20 for each time he mows. Which equation represents the money he makes, d, in dollars that mason makes after he mows n lawns?A) d=20nB) n=20dC) d=20+nD) n=20+dPlease help ASAP thank you