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
Sophie [7]
3 years ago
15

Variable names may contain spaces and punctuation symbols. True False

Computers and Technology
1 answer:
Vladimir79 [104]3 years ago
4 0

Answer:

False

Explanation:

Programming languages use variables to reserve a space in memory needed to hold the values while the program is executed.

Every language has a set of rules to give names to the variables. Some commonly used conventions are listed below.

1. Variable names cannot contain spaces and punctuation symbols.

Example roll num is an incorrect variable name.

2. Variable names begin with alphabets or letters only.

Example a, sal

3. Variable names cannot begin with numbers or digits.

Example sal2019  

4. Variable names can have underscores only in between.

Example mngr_sal, mngr_bonus

Underscores enable categorizing the variables based on the initial name like above.

5. Keywords cannot be used as names of variables.

Example Integer, String cannot be the name of any variable.

6. Special characters are not allowed in the names of the variables.

The above naming conventions are common across all programming languages. Other rules may be implemented specific to a particular language.

Variables are declared to tell the compiler to reserve a memory space which should be sufficient to hold the variable of this type.

int age;

char reply;

string name;

The above variables are of integer, character and string data type respectively.

Variable initialization assigns a value to the variables.

age = 24;

reply = ‘n’;

name = “Brainly Website”;

The character variable holds 1 letter at a time and is written in single quotes.

The string variable holds a sequence of characters, numbers and spaces and is enclosed in double quotes.

Variable declaration and initialization can be done simultaneously.

String full_name = “Lexi 8791”;

As a practise, variable names are not written in upper case except in case of constants. Constants can have names only in upper case.

An example of constant variable name declaration and initialization is given.

static final int MIN_USERS = 10;

The above information about variables is common across the programming languages.

You might be interested in
What are the arguments for writing efficient programs even though hardware is relatively inexpensive?
Ainat [17]

Answer: Even though the hardware is inexpensive the writing of program is not efficient through this method as proper development of program is necessary for the clear execution due to factors like:-

  • The facility of writing program even the cost of hardware is less but it is not a free facility.
  • It also has a slower processing for the execution of the program
  • The construction of the efficient program is necessary for the compilation and execution of it rather than poorly constructed program is worthless and inefficient in working.

7 0
3 years ago
After the following code is executed what will be displayed on the screen? bool correntEmployee = true; double empSalary = 45000
AlexFokin [52]

Answer:

"The employee pay rate is normal" is the correct answer for the above question.

Explanation:

  • The above question code is written in the c++ language, in which there is one variable of bool type whose value is true.
  • And this variable is also tested in the if-condition which gives the true and the if-body will be executed.
  • Then the internal if-condition will give the false result because the value of the empsalary is not less than 45000. It is because the above statement "empsalary=45000" will assign the value 45000 on the empsalary variable.
  • Then the else block will be executed which prints "the employee pay rate is normal".

7 0
3 years ago
If i don't update my computer what threat does my computer face?
Nadusha1986 [10]
Hey there! Hello!

Computer updates, especially smaller security updates, contain security information for new bugs, malware, viruses, etc. that have been written since your last update. So many of these are written for computers at any given time, meaning that keeping your computer updated is a significant step in keeping your computer's defense systems working. Paired up with legit anti-malware, virus protection software, good computer knowledge, and common sense, your computer can remain very safe from these viruses. 

Otherwise, there might be some bug or irregularity within your computer's system itself that was accidentally released an update or two ago by the creators of your computer's software, which may also pose a threat for your computer system. Updating your computer can most likely fix problems like these. But, more commonly, they just keep your computer up to date on the vicious computer threats that are now available for it since the previous update. 

Hope this helped you out! Feel free to ask me any additional questions if you have any. :-)

8 0
3 years ago
The format for the UPDATE command is the word UPDATE, followed by the name of the table to be updated. The next portion of the c
fenix001 [56]

The format for the UPDATE command is the word UPDATE, followed by the name of the table to be updated. The next portion of the command consists of the word <u>SET</u>, followed by the name of the column to be updated, an equals sign, and the new value.​

Explanation:

  • An Update Query is an action query (SQL statement) that changes a set of records according to criteria you specify.
  • The SQL UPDATE Query is used to modify the existing records in a table. You can use the WHERE clause with the UPDATE query to update the selected rows, otherwise all the rows would be affected.
  • Update Queries let you modify the values of a field or fields in a table.

<u>UPDATE Syntax </u>

  • UPDATE table_name
  • SET column1 = value1, column2 = value2, ...
  • WHERE condition;

UPDATE table_name SET column1 = value1, column2 = value2, etc WHERE condition;  

  1. table_name: name of the table
  2. column1: name of first , second, third column....
  3. value1: new value for first, second, third column....
  4. condition: condition to select the rows for which the  
  5. values of columns needs to be updated.

8 0
3 years ago
Write a date transformer program using an if/elif/else statement to transform a numeric date in month/day format to an expanded
boyakko [2]

I wrote it in Python because it was quick so i hope this is helpful

Answer:

date = input('Enter Date: ')

split_date = date.split('/')

month = split_date[0]

day = split_date[1]

if month == '1':

   english_month = 'January'

   spanish_month = 'Enero'

elif month == '2':

   english_month = 'February'

   spanish_month = 'Febrero'

elif month == '3':

   english_month = 'March'

   spanish_month = 'Marzo'

elif month == '4':

   english_month = 'April'

   spanish_month = 'Abril'

elif month == '5':

   english_month = 'May'

   spanish_month = 'Mayo'

elif month == '6':

   english_month = 'June'

   spanish_month = 'Junio'

elif month == '7':

   english_month = 'July'

   spanish_month = 'Julio'

elif month == '8':

   english_month = 'August'

   spanish_month = 'Agosto'

elif month == '9':

   english_month = 'September'

   spanish_month = 'Septiembre'

elif month == '10':

   english_month = 'October'

   spanish_month = 'Octubre'

elif month == '11':

   english_month = 'November'

   spanish_month = 'Noviembre'

elif month == '12':

   english_month = 'December'

   spanish_month = 'Diciembre'

US_English = f'{english_month} {day}'

International_Spanish = f'{day} {spanish_month}'

print(f'US English Form: {US_English}')

print(f'International Spanish Form: {International_Spanish}')

Input:

3/5

Output:

US English Form: March 5

International Spanish Form: 5 Marzo

Explanation:

You start by taking input from the user then splitting that at the '/' so that we have the date and the month in separate variables. Then we have an if statement checking to see what month is given and when the month is detected it sets a Spanish variable and an English variable then prints it to the screen.

Hope this helps.

7 0
2 years ago
Other questions:
  • Direct messaging is similar to email, except
    5·2 answers
  • False when you tap or click the ‘decrease font size’ button, excel assigns the next lowest font size in the font size gallery to
    13·1 answer
  • A customer has a computer for a home business, but wants to have another computer as a web server. What would be the best soluti
    11·2 answers
  • Before going into space, astronauts spend many hours training on flight simulators allowing them to learn how to fly without lif
    10·1 answer
  • Write the header file Stadium.h for a Stadium class. The Stadium class has the following data members: 1) an array of 1000 Seat
    7·1 answer
  • If you can name this you get 15 points: ↑↑↓↓←→←→βα
    10·1 answer
  • Does anyone know any good new online multiplayer console games that are either out or coming out soon.
    7·1 answer
  • Jason works for a restaurant that serves only organic, local produce. What
    15·2 answers
  • A file manager is used for all of the following except ____.
    12·1 answer
  • How many different four-letter combinations for a locker password can you make with the lowercase and uppercase forms of the fir
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!