Guest User

Untitled

a guest
Oct 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. """
  4. Mini Project: 01
  5. Census ToolBox Funny Login
  6. """
  7.  
  8. import random
  9.  
  10. rand1 = random.randint(1,25)
  11. #rand2 = random.randint(1,25)
  12. #passcode = rand1 & rand2
  13. passcode = rand1
  14. print (passcode)
  15. iter = 0
  16. while iter <=5:
  17. number = int(input("Enter the passcode: "))
  18. if number == passcode:
  19. print("Welcome !!!")
  20. break
  21.  
  22. elif number < passcode:
  23. print("invalid passcode")
  24.  
  25. elif number > passcode:
  26. print("INVALID PASSCODE")
  27.  
  28. elif number in range(passcode):
  29. print("InVaLiD PaSsCoDe")
  30.  
  31. iter+=1
Add Comment
Please, Sign In to add comment