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
algol [13]
4 years ago
10

Which if statement does not check for the condition "the month is between May and August and num_finals_left is zero?" Assume th

at month is a string, so we are checking if month is one of "May" "June" "July" "August". You can also assume num_finals is an integer. a. if month in ["May", "June", "July", "August"] and num_finals == 0: b. if month in ["May", "June", "July", "August"] and not num_finals: c. if month == "May" or month == "June" or month == "July" or month == "August" and num_finals == 0: d. if (month == "May" or month == "June" or month == "July" or month == "August") and num_finals == 0
Computers and Technology
1 answer:
larisa [96]4 years ago
3 0

Answer:

Option b  if month in ["May", "June", "July", "August"] and not num_finals:

Explanation:

The if statement in the option b doesn't meet the objective to check if num_finals is zero. It just use a not operator which is not relevant here.  The num_finals is an integer and therefore to check if num_finals is zero, the correct statement should be num_finals == 0  The "==" is an equality operator to check if a left value is equal to the right value. The rest of the three options are correct as they meet the checking requirements.

You might be interested in
When a routerâs interface is configured with multiple ip addresses with each address belonging to different networks, what is it
padilas [110]
<span>When a routerâs interface is configured with multiple ip addresses with each address belonging to different networks, what is it called?
</span>
router on a stick
6 0
3 years ago
Which term is defined as a spreadsheet file?<br> cell<br> column<br> sheet<br> workbook
joja [24]
The answer for this question is sheet.
8 0
3 years ago
Read 2 more answers
Write a Python program that has subprograms nested four deep and in which each nested subprogram references local variables, var
Juliette [100K]

Answer:

Check the explanation

Explanation:

CODE:

global_var = "global" #accessible to all functions

def level0():

level0_var = "level 0" #accessible to level 0,1,2,3

print();

print("Level 0 function:")

print("global variable: ",global_var)

print("local variable 0: ",level0_var)

def level1():

print();

print("Level 1 function:")

level1_var = "level 1" ##accessible to level 1,2,3

print("global variable: ",global_var)

print("local variable 0: ",level0_var)

print("local variable 1: ",level1_var)

def level2():

print();

print("Level 2 function:")

level2_var = "level 2" #accessible to level 2,3

print("global variable: ",global_var)

print("local variable 0: ",level0_var)

print("local variable 1: ",level1_var)

print("local variable 2: ",level2_var)

def level3():

print();

print("Level 3 function:")

level3_var = "level 3" #accessible to level 3

print("global variable: ",global_var)

print("local variable 0: ",level0_var)

print("local variable 1: ",level1_var)

print("local variable 2: ",level2_var)

print("local variable 3: ",level3_var)

level3()

level2()

level1()

level0()

Kindly check the attached image below to see the output  (indentations are important):

6 0
4 years ago
Which type of storage device is better in technology between magnetic and optical?​
Nikolay [14]

Answer:

I think the answer is optical.

5 0
3 years ago
Read 2 more answers
Harvey is creating a presentation for his school project. He wants to have the same look on all the slides of his presentation.
Misha Larkins [42]
He should use PowerPoint and the design should be feathered
8 0
4 years ago
Other questions:
  • Windows 7 is used to run ____ software
    5·2 answers
  • Which of these is not used by analysts when adopting CASE tools? (1 point) (Points : 1.5) communicating more effectively with us
    5·1 answer
  • If a driver who is under the age of 21 is stopped by a law enforcement officer and shown to have a BAL of .02 or greater, he or
    10·1 answer
  • Write a declaration for a class named City, which has the members cityName, a string, and position, a Location structure (declar
    10·1 answer
  • All queries have a locale, true or false?
    15·1 answer
  • A virus that is embedded in the automatically executing scipts commonly found in word processors, spreadsheets, and database app
    13·2 answers
  • Ites and days, on one of the slides in her school presentation. Which element can she use to
    12·2 answers
  • Explain the four misconceptions about entrepreneurship.
    7·1 answer
  • Which of the following was the primary purpose of muckraking, sensationalism, and yellow journalism in the early 1900s?
    11·1 answer
  • Jim is working on a network design for a small office running a Windows file and printer server with Internet
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!