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
Which of the following sets of data would be represented best in histogram?
wariber [46]
I think it would be B. The average monthly sales for the big toy company because its giving data over history
7 0
3 years ago
Read 2 more answers
Help please im not sure what this means T^T
Vesna [10]

Answer:

14

Explanation:

7 0
3 years ago
Read 2 more answers
Write a function call it isEvenPositiveInt which takes an integer x and return true if x is positive and also even. Note isinsta
Anna11 [10]

Answer:

The program to this question as follows:

Program:

def isEvenPositiveInt(x): #defining method isEvenPositiveInt

   if x>0: #checking number is positive or not

       if x%2==0: #check true condition

           return True #return value True

       else:

           return False #return value False

   return False #return value False

print(isEvenPositiveInt(24)) #calling method and print return value

print(isEvenPositiveInt(-24)) #calling method and print return value

print(isEvenPositiveInt(23)) #calling method and print return value

Output:

True

False

False

Explanation:

In the above Python program, a method "isEvenPositiveInt" is defined, that accepts a variable "x" as its parameter, inside the method a conditional statement is used, which can be described as follows:

  • In the if block the condition "x>0" is passed, that check value is positive, if this condition is true, it will go to another if block.
  • In another, if block is defined, that checks the inserted value is even or not, if the value is even it will return "true", otherwise it will go to the else part, that returns "false".  
5 0
3 years ago
How are the stop lamp bulbs connected in relation to each other? a. In parallel. b. In series. c. In series/parallel. d. None of
laiz [17]

In Parallel option A is true

Because In parallel circuit, the voltage across each components is same and the total current is sum of the currents through each component.

6 0
2 years ago
Explain why a special strategy, such as SQRW or KWL, should be used to take notes from a text.
Morgarella [4.7K]

You have an upcoming exam and you are confident that you have read all your books and believe you know your stuff down cold. Somehow, after sitting for your exam, you fail. To avoid this from happening again, you can use methods like SQRW or KWL to make sure that you get a better grade. Each of these techniques are initials that stand for “Survey”, “Question”, “Read”, and “Write” (SQRW) and “Know,” “Want to Know,” and “Learned” (KWL) respectively. People who make the most out of these two strategies will understand what they read and prepare notes of what they learned. These notes will come in handy when sitting for an exam. KWL, specifically, help student become better versions of themselves and improve in reading expository text.

4 0
3 years ago
Other questions:
  • Witch of the following attributes of a website indicates a more reliable source for information
    15·1 answer
  • A typeface in which each character has the same width and is often used to display programming code is _
    8·1 answer
  • A _____ is the useful part of a transmission through a network.
    15·1 answer
  • Select the correct answer from each drop-down menu.
    7·2 answers
  • What are computer crimes?​
    14·1 answer
  • What is ambiguous grammar, explain in maximum 50words.
    5·1 answer
  • Which person would be the best fit for a career in the Information Technology field?
    6·2 answers
  • Choose the response that best completes the following statement.
    14·2 answers
  • Assignment 2: room area <br>programming python in Project Stem​
    8·1 answer
  • 1. The opportunity to create several equations for launching program files is called
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!