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
Over [174]
3 years ago
7

Using the Internet, search and discuss why naming conventions are important and why programmers should consistently follow them.

What problems can arise in naming variables if one convention is not followed.
Computers and Technology
1 answer:
LiRa [457]3 years ago
7 0

Answer:

Answered below

Explanation:

Some variable naming conventions include;

1) Variable should begin with either a letter or an underscore.

2) Variables having multiple words should have the first letter of every word after the first word, capitalized. This is the camelCase style.

3) variables should not be named after any of the inbuilt keywords except on special operations to override the original function of such keyword.

4) variable names are case-sensitive.

The importance of following these conventions is to maintain readability and consistency of code. Failure to follow these conventions may lead to chaotic codes, bugs and inefficient performance.

You might be interested in
Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than
Gnoma [55]

Answer:

public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

Explanation:

Using Java prograamming Language.

The Method (function) print_popcorn_time is defined to accept a single parameter of type int

Using if...else if ....else statements it prints the expected output given in the question

A complete java program calling the method is given below

public class num6 {

   public static void main(String[] args) {

       int bagOunces = 7;

       print_popcorn_time(bagOunces);

   }

   public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

}

3 0
3 years ago
Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a function named newton. This
Shtirlitz [24]

Answer:

def newton(n):

       #Define the variables.

       t = 0.000001

       esti = 1.0

       #Calculate the square root

       #using newton method.

       while True:

               esti = (esti + n / esti) / 2

               dif = abs(n - esti ** 2)

               if dif <= t:

                       break

   

       #Return the result.

       return esti

#Define the main function.

def main():

   

       #Continue until user press enters.

       while True:

               try:

         

                       #Prompt the user for input.

                       n = int(input("Enter a number (Press Enter to stop):"))

                       #display the results.

                       print("newton = %0.15f" % newton(n))

     

               except:

                       return

#Call the main function.

main()

7 0
3 years ago
Mention any four features which a standard computer laboratory should have​
Vera_Pavlovna [14]

Answer:

•Make sure doorway openings are at least 32 inches wide and doorway thresholds are no higher than 1/2 inch.

•Keep aisles wide and clear for wheelchair users.

•Make sure all levels of the lab are connected by a wheelchair-accessible route of travel.

For students with mobility impairments, make sure there are procedures in place for retrieving materials that may be inaccessible.

Make sure ramps and/or elevators are provided as an alternative to stairs. Elevators should have both auditory and visual signals for floors. Elevator buttons should be marked in large print and Braille or raised notation and easily reachable for wheelchair users.

Locate the lab near wheelchair-accessible restrooms with well-marked signs.

Service desks need to be wheelchair-accessible.

Provide ample, high-contrast, large-print directional signs throughout the lab. Mark equipment in the same fashion.

Provide study carrels, hearing protectors, or private study rooms for users who are easily distracted by noise and movement around them.

Provide at least one adjustable-height table with easily reachable controls for each type of computer.

Have wrist rests available to those who require extra wrist support while typing.

Keep document holders available to help users position documents for easy reading.

5 0
2 years ago
Read 2 more answers
7.2 code practice edhesive
goblinko [34]

Answer:

Explanation:

got a 100

7 0
3 years ago
Read 2 more answers
WILL MARK BRAIN LIST!
Maslowich
I think it’s a

if it isn’t a then it’s d
6 0
3 years ago
Read 2 more answers
Other questions:
  • What is a way to Procter your social security number and other sensitive information from identity theft
    9·1 answer
  • Electronic files created on a computer using programs such as word software are considered to be
    15·1 answer
  • Help me on this question
    14·1 answer
  • Dan works for an automobile company. He has designed a new model of a car based on an older version. Which technology can he use
    6·1 answer
  • It is unlawful in the State of Florida for any person, ______________________, to be a passenger in the front seat of a motor ve
    7·1 answer
  • Calculate the maximal size of a file if we have:
    6·1 answer
  • Write a script that checks to see if at least one argument has been given on the command line and tests whether the argument is
    5·1 answer
  • David plays racing games on his way to work. He uses the analog stick to navigate his vehicle through other artificial intellige
    7·2 answers
  • Describe who was Alan Turing in 100 words.<br> First to answer will get brainliest.
    7·1 answer
  • When conducting memory and recall tests, some people make an effort to normalize memories by not reporting extreme cases. this l
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!