User Profile

Collapse

Profile Sidebar

Collapse
swaroop11
swaroop11
Last Activity: Jul 18 '19, 06:50 AM
Joined: Jul 18 '19
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Is there a command for getting out of the function?

    I just started with python. I tried to write a small code for guessing a number. I wondered if we can get out of the function only, not the whole program.

    Code:
    def user_guess(num):
    	if(num==rand_num):
    		print "hurrey! you guessed it right.\n"
    		another_try=raw_input("would you like to guess another number??\n")
    		if(another_try == "y" or another_try == "yes"):
    ...
    See more | Go to post

  • swaroop11
    replied to Getting out of a recursive function...
    hey nathan! i have the same question,

    I think that the function doesn't work that way.. but still,if you find a solution please reply to this message,
    thanks!
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...