[Tutor] first post

Dave Angel davea at davea.name
Sun Feb 1 15:23:47 CET 2015


On 02/01/2015 07:09 AM, sathya kumar Prasanna wrote:
> Hi guys,
>
> I am completely new to programming

Welcome to the Python tutor forum.  Thanks for posting in text format, 
but you forgot to describe your Python version and operating system.

> and have never had the opportunity to do
> attempt coding before. However I have started now and am facing my first
> problem.
> The code is as shown, I need to *fill in the blanks* such that when the
> code is run it gives the answer as "True".
>
> #Please help.
>
> # Make sure that the_flying_circus() returns True
> def the_flying_circus():
>      if ________:    # Start coding here!
>          # Don't forget to indent
>          # the code inside this block!
>      elif ________:
>          # Keep going here.
>          # You'll want to add the else statement, too!
>

You forgot to post the rest of the assignment.  As it stands, one answer 
could be:

def the_flying_circus():
     if "the moon" == "green cheese":
         pass
     elif 6*9 == 42:
         pass
     else:
         pass
     return True


Naturally, the function contents don't matter much if you don't call it, 
so you'd need to add a line like:

print( repr(the_flying_circus()) )

to actually call the function.

-- 
DaveA


More information about the Tutor mailing list