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
jeka94
2 years ago
5

Zara wants to create some lines of code that are ignored by the computer. What should these lines begin with?

Computers and Technology
1 answer:
Lera25 [3.4K]2 years ago
4 0

Answer:

The correct answer is: Option 2: #

Explanation:

Comments are additional information that is added to a program. The comments help the person who is viewing or reviewing the program to understand logic or function and variable definitions.

In Python, comments are added using the # symbol and adding a white space after it.

The interpreter doesn't interpret the comment section of the program.

Hence,

The correct answer is: Option 2: #

You might be interested in
python A pet shop wants to give a discount to its clients if they buy one or more pets. The discount is equal to 20 percent of t
Artyom0805 [142]

Answer:

The following are the program in the Python Programming Language.

#define function

def discount(prices, isPet, nItems):

 # declare and initialize variables to 0

 i = 0

 cost = 0

 pets = 0

 item = 0

 item_Cost = 0

 #set the while loop

 while(i < nItems):

   #check the items of the variable

   if isPet[i]:

     #add and initialize in the cost

     cost += prices[i]

     #increament in the variable by 1

     pets += 1

   #otherwise

   else:

     #add and initialize in the item_Cost

     item_Cost += prices[i]

     #increament in the variable by 1

     item += 1

   #then increment in the variable by 1

   i += 1

 #check the pet is greater than equal to 1  

 #and item is greater than equal to 5

 if(pets >= 1 and item >=5):

   #then, print the message

   print("You receive discount")

   #set discount of the items

   discount = 0.2 * item_Cost

   # calculate bill after deducting discount

   bill = cost + item_Cost - discount

   #print the bill

   print("Final Bill amount is", bill)

 #otherwise

 else:

   #print the message

   print("You do not receive any discount")

   #calculate bill without deducting discount

   bill = cost + item_Cost

   #print the final bill

   print("Final Bill amount is", bill)

#set empty list type variables

price = []

pet = []

#set the infinite loop

while True:

 #get input from the user

 sprice = int(input("Enter the price (-1 to quit): "))

 #check that price is not equal to the -1

 if(sprice != -1):

   #add price in the list

   price.append(sprice)

   #ask for choice from the user

   choice = input("Is it a pet (Y / N)? ")

   #check the choice of the user is y or Y

   if(choice == 'Y' or choice == 'y'):

     # then, add in the pet

     pet.append(True)

   #otherwise

   else:

     #not add in the pet

     pet.append(False)

   print("")

 #break the loop

 else:

   break

#declare variable that store the length

items = len(price)

#call and initialize the variable

discount(price, pet, items)

<u>Output</u>:

Enter the price (-1 to quit): 96

Is it a pet (Y / N)? y

Enter the price (-1 to quit): 69

Is it a pet (Y / N)? n

Enter the price (-1 to quit): 41

Is it a pet (Y / N)? n

Enter the price (-1 to quit): 52

Is it a pet (Y / N)? n

Enter the price (-1 to quit): 96

Is it a pet (Y / N)? n

Enter the price (-1 to quit): 74

Is it a pet (Y / N)? n

Enter the price (-1 to quit): -1

You receive discount

Final Bill amount is 361.6

Explanation:

<u>The following are the description of the program</u>.

  • Firstly, define the function 'discount()' and pass the arguments 'prices', 'isPet' and 'nItems' in its parameter.
  • Then, declare and initialize the variables 'i' to 0, 'item_Cost' to 0
  • , item to 0, 'cost' to 0 and 'pets' to 0.
  • Then, set the while loop to add the price of the items and the cost of the pets.
  • Set the if-else conditional statement to check the pet is greater than equal to 1 and the items are greater than equal to 5 then, set the discount and print the bill after deduction.
  • Otherwise, print the bill without deduction.
  • Finally, set two list type variable then, set the infinite while loop that gets input from the user and check that the variable is not equal to -1 then append the data in the list then again check the user input then append in pet otherwise not append in pet and break the loop. Then, set the variable that stores the length of the price and call the following function by passing arguments in its parameter.
8 0
3 years ago
How many pieces are there in a normal laptop??? Good luck and solve carefully
polet [3.4K]

What do you mean pieces? Like Laptop components? If so then motherboard,ram,cpu, and psu for a basic laptop so 4 I guess (5 if you want to include a gpu).

4 0
3 years ago
In the context of organizational decisions at the tactical management level, _____ decisions are often used in resolving conflic
natali 33 [55]

Answer:

b. structured

Explanation:

Based on the information being described within the question it can be said that the type of decisions being mentioned are known as structured decisions. These are decisions which have various processes in place in order to handle a certain situation. Usually due to the problem having occurred countless times and are predictable.

4 0
3 years ago
In basic network scanning, ICMP Echo Requests (type 8) are sent to host computers from the attacker, who waits for which type of
Hoochie [10]

Answer:

d. ICMP Echo Reply (type 0)

Explanation:

ICMP or internet control message protocol is an Internet layer protocol in the TCP/IP suite. It works together with routing devices like the router to send messages based on results sensed in the network.

The RFC 1122 has stated that the ICMP server and end user application be configured or installed in user devices, for receiving and sending ICMP echo request packets and reply. The process is called pinging.

For an attacker to implement ping of ping, he needs to confirm if the target user in live by sending an ICMP echo request packet type 8, to receive an ICMP echo reply type0.

4 0
2 years ago
There is no way to track your smartphone once you lost it, true or false?
Ymorist [56]
If you originally had a tracking device installed on a different device like find my iPhone, you can easily see where it is. If your phone is Android, Google has a system where you can search where's my phone, and if you have your email login into your phone, you can log in on Google and Google will show you where it is. 
6 0
3 years ago
Read 2 more answers
Other questions:
  • What country threatens Denmark at the beginning of Hamlet as evidenced in Marcellus’s question, "Why this same strict and most o
    13·1 answer
  • A store trying to analyze the behavior of its customers will often maintaina two-dimensional array A, where the rows correspond
    6·1 answer
  • Write a program that reads from the user any three points in two dimensional space: x1, y1, x2, y2, x3, y3. Assume these points
    13·1 answer
  • Why does my inbox keep getting notifications and then disappearing?
    15·2 answers
  • A town government is designing a new bus system. The planners are deciding where to put the different bus stops. They want to pi
    6·2 answers
  • Many bookstores have closed since the rise of the Internet. What type of
    11·1 answer
  • second question today 25 POINTS: What is the formula to balance a lever when both effort and resistance are present?
    14·1 answer
  • What is smarta Art ? ​
    10·1 answer
  • I need help now with YT
    7·2 answers
  • after teaching a group of students about measuring systems and drug calculations, the instructor determines that the teaching wa
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!