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
ryzh [129]
3 years ago
8

Which of the following is a valid variable name? 1. three com 2. 3com 3. 3 com 4. ampersand&

Computers and Technology
1 answer:
Maru [420]3 years ago
4 0

***Correction: <em>Options of the question have mistakes in them. The correct options are given in the comment section under the question above</em>***

Answer:

The correct answer is Option (1) three_com

Explanation:

There are a few rules you need to keep in mind while naming any variable, which are as follows:

  • The first letter of any variable name should be either a letter of an alphabet or an underscore. For example, helloWorld or _helloWorld.
  • No special characters (except underscore obviously) or spaces in between the name are allowed. For example, <em>hello&world</em> or <em>hello world</em> are not valid names.
  • The first letter of the variable name should not be a number.

Now look at all the options given:

Option-1 (three_com): The name starts with the letter <em>t</em> of an alphabet and there are no spaces or special characters in it except an <em>underscore</em> (which is acceptable). Therefore, this option is correct.

Option-2 (3com): The name starts with a number. Not allowed.

Option-3 (3_com): The name starts with a number. Not allowed.

Option-4 (ampersand&): The name has a special character <em>&</em> in it, which is not allowed as per the aforementioned rules.

Hence, the correct answer is option (1) <em>three_com</em>.

You might be interested in
This formatting option functions like a space bar. However, instead of moving one space at a time, it allows you to move your te
uysha [10]
Would it be Tab. I know that if you are in Microsoft word it works like that.<span />
3 0
3 years ago
What is the synonym for term port?
Rus_ich [418]
The synonym for term port is seaport

3 0
3 years ago
_ effects determine how slide elements disappear
kupik [55]
<span>Exit effects determine how slide elements disappear. </span>
6 0
4 years ago
Generally speaking, the _______ the risk, the _______ the potential return or loss
givi [52]
<span>The correct answer is higher for both blank spaces.

We all know the famous saying: "No risk, no reward". What is true is the higher your risk you also have a higher degree of reaping a higher rewards. But the opposite is also true, the more you risk the more you stand to lose. In stockbroker business this is best exemplified, as you can se brokers trying to predict the stock market in order to make greater profits. Gambling is also the good example of this. </span>
6 0
3 years ago
Read 2 more answers
Hello, I've tried everything and I cannot get this code to be fair. I need help. Can someone provide guidance so I can understan
Liula [17]

A program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day is given below:

<h3>The Program</h3>

input_month = input()

input_day = int(input())

months= ('January', 'February','March', 'April' , 'May' , 'June' , 'July' , 'August' , 'September' , "October" , "November" , "December")

if not(input_month in months):

  print("Invalid")

elif input_month == 'March':

   if not(1<=input_day<=31):

       print ("Invalid")

   elif input_day<=19:

       print("Winter")

   else:

      print ("Spring")

elif input_month == 'April' :

   if not(1<=input_day<=30):

       print("Invalid")

   else:

      print("Spring")

elif input_month == 'May':

   if not(1<=input_day<=31):

       print("Invalid")

   else:

       print("Spring")

elif input_month == 'June':

   if not(1<=input_day<=30):

       print("Invalid")

   elif input_day<=20:

       print ("Spring")

   else:

       print("Summer")

elif input_month == 'July' or 'August':

   if not(1<=input_day<=31):

       print("Invalid")

   else:

       print("Summer")

elif input_month == 'September':

   if not(1<=input_day<=30):

       print("Invalid")

  elif input_day<=21:

       print ("Summer")

   else:

       print ("Autumn")

elif input_month == "October":

   if not(1<=input_day<=31):

      print("Invalid")

   else:

       print("Autumn")

elif input_month == "November":

   if not(1<=input_day<=30):

       print("Invalid")

   else:

       print ("Autumn")

elif input_month == "December":

   if not(1<=input_day<=31):

       print("Invalid")

   elif input_day <=20:

       print ("Autumn")

   else:

       print ("Winter")

elif input_month == 'January':

   if not(1<=input_day<=31):

       print("Invalid")

   else:

       print("Winter")

elif input_month == "February":

   if not(1<=input_day<=29):

       print("Invalid")

   else:

       print ("Winter")

Read more about programming here:

brainly.com/question/23275071

#SPJ1

5 0
2 years ago
Other questions:
  • Write a MIPS assembly language program that prompts for a user to enter how many floating point numbers to enter, then prompts t
    10·1 answer
  • Checking tire pressure should be performed:
    11·2 answers
  • python If the checksum is 10, the last digit is denoted as X according to the ISBN-10 convention. Write a program that prompts t
    10·1 answer
  • What X coordinate does the center of a game begin at?
    9·1 answer
  • Lines s, t, and u are perpendicular bisectors of the sides FGH and meet at J. If JG=2x+2, JH=2y-4, JF=8 and HI=3z-3, find x, y,
    15·2 answers
  • What is the output of the C++ codeabove?
    14·1 answer
  • Ask the user to input a number less than 100. Print all the numbers from that number to 100.
    6·2 answers
  • If the tax percent is 15% and tax is $36 and percent discount is 10, what is the cost price?​
    12·1 answer
  • When software is purchased, a _____ is being bought that gives the purchaser the right to use the software under certain terms a
    9·1 answer
  • These are pictorial images displayed on a computer screen​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!