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
Describe copyright statute, disclaimers, and filing procedures.
gayaneshka [121]

Answer:(Answers may vary.)

I researched about different concepts regarding statute of limitations, disclaimers, and filing procedures regarding copyright issues.

Statute of limitations

Statute of limitations for copyright falls under two categories. The first is a limitation for ‘Criminal Proceedings’. In this case, the statute stands that the claim (or lawsuit) has to be filed within five years of the cause (act of infringement). The second consideration is in the ‘Civil Action’ case. Here the claim (lawsuit) has to be filed within three years of the cause. Many times the last act of infringement is taken as the date from which these five (or three) years are calculated. There have been cases where the date when the infringement was discovered by the victim, is taken as a starting date.

Disclaimers

A disclaimer is a statement that is intended to pass on some information about the content of the design to the viewer. This disclaimer may be to signify the intent of the designer behind the content. It may also be a suggestion or warning to ensure the viewer uses discretion while viewing the content. A disclaimer is mutual understanding between the designer and viewer. This would protect the designer rights in a situation where the viewer claims damages after the viewer clearly disregarded the disclaimer.

Filing procedures

A claim for copyright has to be filed (ideally) before any infringement occurs, or within three months of the infringement. Timely registration would help the claim for damages. I can file for a copyright online (U.S. Copyright Office). I can also file for a copyright in printed form at the U.S. Copyright Office. I would need two copies of my work at the time of filing. The online facility is charged (fees) lesser than direct submission. I would have to sure which form I fill, as all the forms refer to different types of work.

Explanation: I just did it and it showed me.

7 0
1 year ago
Interpretations of​ Moore's law assert​ that:
jonny [76]

Answer:

Option (D) is the correct answer of this question.

Explanation:

Moore's Law relates to Moore's theory that the number of transistors on a microchip doubles every two years while device costs are halved.

Interpretations  of Moore's law assert the computing power doubles every 18 months.The Moore's Law theory states that development is exponential.Moore's Law states that every couple of years we should expect our computers to increase their speed and capacity and we'll pay less for them.h

Option(A),Option(B) ,Option(c) and option(E) do not belongs to Moore's law  so these options are incorrect options.

5 0
1 year ago
Design an application for Bob's E-Z Loans. The application accepts a client's loan amount and monthly payment amount. Output the
zmey [24]

Answer:

part (a).

The program in cpp is given below.

#include <stdio.h>

#include <iostream>

using namespace std;

int main()

{

   //variables to hold balance and monthly payment amounts

   double balance;

   double payment;

   //user enters balance and monthly payment amounts

   std::cout << "Welcome to Bob's E-Z Loans application!" << std::endl;

   std::cout << "Enter the balance amount: ";

   cin>>balance;

   std::cout << "Enter the monthly payment: ";

   cin>>payment;

   std::cout << "Loan balance: " <<" "<< "Monthly payment: "<< std::endl;

   //balance amount and monthly payment computed

   while(balance>0)

   {

       if(balance<payment)    

         { payment = balance;}

       else

       {  

           std::cout << balance <<"\t\t\t"<< payment << std::endl;

           balance = balance - payment;

       }

   }

   return 0;

}

part (b).

The modified program from part (a), is given below.

#include <stdio.h>

#include <iostream>

using namespace std;

int main()

{

   //variables to hold balance and monthly payment amounts

   double balance;

   double payment;

   double charge=0.01;

   //user enters balance and monthly payment amounts

   std::cout << "Welcome to Bob's E-Z Loans application!" << std::endl;

   std::cout << "Enter the balance amount: ";

   cin>>balance;

   std::cout << "Enter the monthly payment: ";

   cin>>payment;

   balance = balance +( balance*charge );

   std::cout << "Loan balance with 1% finance charge: " <<" "<< "Monthly payment: "<< std::endl;

   //balance amount and monthly payment computed

   while(balance>payment)

   {

           std::cout << balance <<"\t\t\t\t\t"<< payment << std::endl;

           balance = balance +( balance*charge );

           balance = balance - payment;

       }

   if(balance<payment)    

         { payment = balance;}          

   std::cout << balance <<"\t\t\t\t\t"<< payment << std::endl;

   return 0;

}

Explanation:

1. The variables to hold the loan balance and the monthly payment are declared as double.

2. The program asks the user to enter the loan balance and monthly payment respectively which are stored in the declared variables.  

3. Inside a while loop, the loan balance and monthly payment for each month is computed with and without finance charges in part (a) and part (b) respectively.

4. The computed values are displayed for each month till the loan balance becomes zero.

5. The output for both part (a) and part (b) are attached as images.

4 0
1 year ago
Initialize the list short_names with strings 'Gus', 'Bob', and 'Zoe'. Sample output for the given program:
ohaa [14]

Answer:

Following are the correct code to this question:

short_names=['Gus','Bob','Zoe']#defining a list short_names that holds string value

print (short_names[0])#print list first element value

print (short_names[1])#print list second element value

print (short_names[2])#print list third element value

Output:

Gus

Bob

Zoe

Explanation:

  • In the above python program code, a list "short_names" list is declared, that holds three variable that is "Gus, Bob, and Zoe".
  • In the next step, the print method is used that prints list element value.
  • In this program, we use the list, which is similar to an array, and both elements index value starting from the 0, that's why in this code we print "0,1, and 2" element value.
7 0
1 year ago
Write an if-else statement to describe an integer. Print "Positive even number" if isEven and is Positive are both true. Print "
Nina [5.8K]

Answer:

C code explained below

Explanation:

#include <stdio.h>

#include <stdbool.h>

int main(void) {

int userNum;

bool isPositive;

bool isEven;

scanf("%d", &userNum);

isPositive = (userNum > 0);

isEven = ((userNum % 2) == 0);

if(isPositive && isEven){

  printf("Positive even number");

}

else if(isPositive && !isEven){

  printf("Positive number");

}

else{

  printf("Not a positive number");

}

printf("\n");

return 0;

}

6 0
1 year ago
Other questions:
  • Computer hardware without software is useless while computer software without hardware is meaningless. Discuss. Plz provide exam
    15·1 answer
  • 4.2.3: Basic while loop expression. Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Fol
    6·2 answers
  • Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
    7·1 answer
  • Jane's organization recently experienced a security incident that occurred when malware set to trigger on the chief executive of
    13·1 answer
  • The following parts were ordered by someone building a personal computer:
    12·1 answer
  • In cell J4, calculate
    8·1 answer
  • Your project must satisfy the following requirements:
    7·1 answer
  • Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 3, print "To
    9·1 answer
  • Using virtualization comes with many advantages, one of them being performance. Which of these is NOT another realistic advantag
    7·1 answer
  • Define a method printAll() for class PetData that prints output as follows with inputs "Fluffy", 5, and 4444. Hint: Make use of
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!