Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. from random import randint
  2. import sys, time
  3.  
  4. zahl_gefunden = False
  5.  
  6. while not(zahl_gefunden):
  7. zahl = randint(1,100)
  8. checker = zahl % 5
  9. if zahl >= 60 and zahl <= 70:
  10. zahl = 69
  11. print(zahl)
  12. zahl_gefunden = True
  13. elif checker == 0:
  14. print(zahl)
  15. zahl_gefunden = True
  16.  
  17.  
  18. def delay_print(text):
  19. for i in range(len(text)):
  20. sys.stdout.write(text[i])
  21. sys.stdout.flush()
  22. time.sleep(0.10)
  23. def pokemon_print(satz):
  24. inhalt = satz.split(" ")
  25. for i in range(len(inhalt)):
  26. delay_print(inhalt[i])
  27. sys.stdout.write(" ")
  28. time.sleep(0.9)
  29. pokemon_print("Das ist ein Test")
  30.  
  31. vorbei = False
  32. while not(vorbei):
  33. eingabe = input("Zahl: ")
  34. try:
  35. int(eingabe)
  36. except:
  37. print("Keine Zahl!")
  38. continue
  39. eingabe = int(eingabe) * int(eingabe)
  40. print(eingabe)
  41. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement