62.2k views
2 votes
For questions 2-4, consider the following code:

if month == 7:

if day <= 15:

print("First half of the month")

else:

print("Second half of the month")

else:

print("Not in July")



What is the output if month = 7 and day = 14?
Group of answer choices

Nothing is output

Not in July

First half of the month

Second half of the month

User Joba
by
8.3k points

1 Answer

3 votes

Answer:

First half of the month

Step-by-step explanation:

first if statement is true; nested if statement is true so the statement print("First half of the month") is executed

User Koti Tummala
by
8.1k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.