Sail E0 Webinar
Question
What is the output of the given code?hungry=falseunless hungry print "Not hungry"else print "Hungry"end
Options:
A .  Not hungry
B .  Hungry
C .  Syntax error
D .  None of the mentioned
Answer: Option D


As hungry is initialized to false hence the unless condition is executed.
Output:
Not hungry



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers