Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. def countToTen(valueParm):
  2. if type(valueParm) is int and valueParm !=None:
  3. if valueParm < 10:
  4. while valueParm < 10:
  5. if valueParm < 10:
  6. valueParm += 1
  7. print valueParm
  8.  
  9.  
  10. print ("Done counting")
  11. return
  12. else:
  13. print("That number is larger than 10.")
  14. else:
  15. print ("Invalid Parameter")
  16. return
  17.  
  18. myParm = raw_input("Enter a number to count to ten from: ")
  19. if myParm.isdigit():
  20. countToTen(int(myParm))
  21. else:
  22. print("Not a digit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement