answer.
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
liberstina [14]
2 years ago
8

Mark and John are developing a program using Python. They name a variable 24_hour_mart, but then recognize that this name violat

es a Python naming convention. What naming convention does it violate?
Variable names can not include the underscore character (_).
Variable names can not begin with a number.
Variable names can not exceed ten characters in length.
Variable names can not be fewer than fifteen characters in length.
Computers and Technology
1 answer:
77julia77 [94]2 years ago
3 0

Answer:

Option 2: Variable names can not begin with a number.

Explanation:

As given Mark and John named a variable as 24_hour_mart while writing a program in python.

While it is forbidden to name a variable starting with any digit, only alphabets (capital and smaller) and underscore can be the first letter of the variable name.

Moreover, by considering the other options given:

  • Variable name can include the underscore (_) between the words. It is used instead of spaces that are not allowed.
  • There is no upper limit for variable length, it can be of any reasonable length and more than 10 characters say 11 or 12 are reasonable.
  • There is no lower limit for variable length, it can be any reasonable length , even it can be of 1 character.

Variables named in python language must not be the keywords as they are reserved for other purposes.

i hope it will help you!

You might be interested in
You work for a shipping company and your manager receives orders from various customers everyday some existing ,some new .your m
Gennadij [26K]

Answer:

It's good to consider this as a dictionary, with key-value pair, or as a two-dimensional array.

And in the first case, the code will be as below:

day_i={'Bob':'100', 'Alice':'100','Celia':'110','Bob':'200'}

for k, v in day_i.items():

print(k, v)

Explanation:

The above code reads through each day, and each customer purchase amount in the form of Dictionary, and prints each customer name and purchase amount. And with little enhancement, we can create each day data, and print details of the day, as being asked by the user.

6 0
2 years ago
Create a program named Auction that allows a user to enter an amount bid on an online auction item. Include three overloaded met
Olin [163]

Answer:

Explanation:

The following code is written in Java and creates the overloaded methods as requested. It has been tested and is working without bugs. The test cases are shown in the first red square within the main method and the output results are shown in the bottom red square...

class Auction {

   public static void main(String[] args) {

       bid(10);

       bid(10.00);

       bid("10 dollars");

       bid("$10");

       bid("150 bills");

   }

   public static void bid(int bid) {

       if(bid >= 10) {

           System.out.println("Bid Accepted");

       } else {

           System.out.println("Bid not high enough");

       }

   }

   public static void bid(double bid) {

       if(bid >= 10) {

           System.out.println("Bid Accepted");

       } else {

           System.out.println("Bid not high enough");

       }

   }

   public static void bid(String bid) {

       if (bid.charAt(0) == '$') {

           if (Integer.parseInt(bid.substring(1, bid.length())) > 0) {

               System.out.println("Bid Accepted");

               return;

           } else {

               System.out.println("Bid not in correct Format");

               return;

           }

       }

       int dollarStartingPoint = 0;

       for (int x = 0; x < bid.length(); x++) {

           if (bid.charAt(x) == 'd') {

               if (bid.substring(x, x + 7).equals("dollars")) {

                   dollarStartingPoint = x;

               } else {

                   break;

               }

           }

       }

       if (dollarStartingPoint > 1) {

           if (Integer.parseInt(bid.substring(0, dollarStartingPoint-1)) > 0) {

               System.out.println("Bid Accepted");

               return;

           } else {

               System.out.println("Bid not in correct format");

               return;

           }

       } else {

           System.out.println("Bid not in correct format");

           return;

       }

   }

}

3 0
1 year ago
As the network administrator for a growing company, you’re asked to solve a remote access dilemma. The 12 employees who work fro
Strike441 [17]

Answer:

To provide remote network access to the users to work, the network administrator can use virtual private network (VPN) along with some firewall to protect the system from hackers and other security threats.

Explanation:

Virtual Private Network (VPN) can be used to provide remote access to the users who are currently working from some remote areas. Many companies who have their branches or franchises in different parts of the city uses VPN to connect then all with the company server.

In this way, a firewall has been needed that protect the systems of users as well as company to protect from different security hazards such as hackers, authorization of the users and other security threats.

in this case, 12 em[employees who need remote access to the network can be connected through VPN along with the installation of some suitable firewall.

8 0
2 years ago
Ryan is applying a sort to the data in a table that you have inserted in Word. Which option is important for most tables that ha
Mademuasel [1]

Answer:

D). Choose the correct sort field

Explanation:

You can arrange in descending, or you can arrange in ascending. And C, has nothing to do with this requirement. You don't have this option available with you. Select the option, "My list has header row" is not available to us. And clearly, you need to choose the best sort field first. And then you can arrange or sort accordingly.

7 0
2 years ago
Read 2 more answers
The database structure in a dbms is stored as a _____.
Colt1911 [192]
This will be stored as a collection of files
6 0
2 years ago
Other questions:
  • Brake lights on freeways invite A: law enforcement B: panic C: sudden lane changing D: both B and C E: positive driving habits
    13·1 answer
  • Why would Network Systems employees be employed by the government?
    12·2 answers
  • I can't imagine any reason _______ he should have behaved in such an extraordinary way. for that why how
    8·1 answer
  • The ________ program displays graphics and loading screens during the boot process.
    8·1 answer
  • . Write a function wordscramble that will receive a word in a string as an input argument. It will then randomly scramble the le
    10·1 answer
  • Given an array of ints named x and an int variable named total that has already been declared, write some code that places the s
    6·1 answer
  • Develop an EER model for the following situation using the traditional EER notation, the Visio notation, or the subtypes inside
    8·1 answer
  • Sara is having a tough time finding the cause of a problem on a computer she is troubleshooting. She found a possible problem bu
    15·1 answer
  • You resurrected an old worksheet. It appears to contain most of the information that you need, but not all of it. Which step sho
    10·1 answer
  • Which is true regarding pseudocode
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!