anatomy.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Program to keep practicing anatomy.
  2. # (C) J.Y.Amihud 2024
  3. # License: GPL v3 or any later version.
  4. import os
  5. import sys
  6. import random
  7. import time
  8. # Generating anatomy course.
  9. def generate(amount=10):
  10. print("Generating...")
  11. #time.sleep(3)
  12. bodytypes = ["muscular", "skinny", "fat", "normal"]
  13. sexes = ["male", "female"]
  14. ages = ["baby", "child", "teenager", "adult", "middle-aged", "old"]
  15. parts = ["full-body", "torso", "back", "head", "arm", "hand", "leg", "foot"]
  16. output_list = []
  17. for i in range(amount):
  18. item = [False, random.choice(bodytypes),
  19. random.choice(sexes),
  20. random.choice(ages),
  21. random.choice(parts)]
  22. if "baby" in item:
  23. item[1] = "cute"
  24. if "child" in item and item[1] == "muscular":
  25. item[1] = "normal"
  26. output_list.append(item)
  27. print("Done!")
  28. return output_list
  29. try:
  30. amount = int(sys.argv[1])
  31. except:
  32. amount = 10
  33. l = generate(amount)
  34. def draw(l):
  35. done = 0
  36. for i in l:
  37. t = "[ ] "
  38. if i[0]:
  39. done = done + 1
  40. t = "[x] "
  41. print(t, i[1][0].upper()+i[1][1:], i[2], i[3], i[4])
  42. print("Done", int(done/len(l)*100), "%")
  43. making = 0
  44. while True:
  45. making = making + 1
  46. os.system("clear")
  47. if (making-1) % 5 == 0 and making != 1:
  48. print("Take a short break!")
  49. input()
  50. os.system("clear")
  51. draw(l)
  52. input()
  53. for b, i in enumerate(l):
  54. if not i[0]:
  55. l[b][0] = True
  56. break
  57. if b == len(l)-1:
  58. break
  59. os.system("clear")
  60. draw(l)