29.0k views
24 votes
What will be printed by the following code segment?

x=15
if x==25:
print ('Pizza is yummy’)
else:
print ('My teacher is awesome')

User Sudhir
by
4.3k points

1 Answer

9 votes

Answer:

My teacher is awesome

Step-by-step explanation:

This is because, since x = 15 and the output only prints 'Pizza is yummy’ for x == 25, and 'My teacher is awesome' for everything else, the output is thus 'My teacher is awesome' since, x = 15 ≠ 25.

User StephenS
by
4.6k points