advice.py 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. def ad_jump(result):
  2. ret=""
  3. if(result["jump_power"]["level"]==3):
  4. ret=ret+"Need to do more to promote leg muscle strength. "
  5. elif(result["jump_power"]["level"]==4):
  6. ret="The leg muscle is weak and the position needs to be improved. "
  7. if(result["core_strength"]["level"]==3):
  8. ret=ret+"The core strength need to be improved. "
  9. elif result["core_strength"]["level"]==4:
  10. ret=ret+"More practice to do to promote the core strength. "
  11. if(result["landing_position"]["level"]==3):
  12. ret=ret+"The landing position is not standard enough. Take some practice on the leg. "
  13. elif result["landing_position"]["level"]==4:
  14. ret=ret+"The landing position is far from standard, see some relavant video to correct posture. "
  15. if(ret==""):
  16. ret="The jump is good and keep it!"
  17. return ret
  18. def ad_juanfu(result):
  19. ret=""
  20. if(result["head_power"]["level"]==3):
  21. ret=ret+"Need to do more to promote head muscle strength. "
  22. elif(result["head_power"]["level"]==4):
  23. ret="The neck and abdominal muscles are weak and the position needs to be improved. "
  24. if(result["core_strength"]["level"]==3):
  25. ret=ret+"The core strength need to be improved.See some relavent video to promote it. "
  26. elif result["core_strength"]["level"]==4:
  27. ret=ret+"More practice to do to promote the core strength. "
  28. if(result["body_stability"]["level"]==3):
  29. ret=ret+"The body_stability is not enough. Take some practice on the leg. "
  30. elif result["body_stability"]["level"]==4:
  31. ret=ret+"The body_stability is far from standard, see some relavant video to correct posture . "
  32. if(ret==""):
  33. ret="The abdominal campaign is good and keep it!"
  34. return ret
  35. def ad_pingban(result):
  36. ret=""
  37. if(result["arm_strength"]["level"]==3):
  38. ret=ret+"Need to do more to promote arm muscle strength. "
  39. elif(result["arm_strength"]["level"]==4):
  40. ret="The forearm strength are inadequate and the position needs to be improved. "
  41. if(result["stability"]["level"]==3):
  42. ret=ret+"The core strength need to be improved.Try to lengthen duration time and frequency. "
  43. elif result["stability"]["level"]==4:
  44. ret=ret+"More practice to do to promote the stability . "
  45. if(result["standard"]["level"]==3):
  46. ret=ret+"Plank movements are less than standard and require more straight leg support. "
  47. elif result["standard"]["level"]==4:
  48. ret=ret+"The body posture is far from standard ,see the standard video and improve leg strength. "
  49. if(ret==""):
  50. ret="Plank moves are fine, and your goal is to maximize your endurance!"
  51. return ret
  52. def ad_shendun(result):
  53. if(result["leg_strength"]["level"]==1):
  54. return "The posture is good and remember to enhance endurance. "
  55. elif result["leg_strength"]["level"]==2:
  56. return "Try a wider squat."
  57. elif result["leg_strength"]["level"]==3:
  58. return "Squat range is far from enough, more practice thigh strength. "
  59. else:
  60. return "Check out some video to learn about standard postures and work on your thigh and calf muscles"
  61. def ad_gaotaitui(result):
  62. if(result["standard"]["level"]==1):
  63. return "The posture is good and remember to enhance endurance. "
  64. elif result["standard"]["level"]==2:
  65. return "Try to elevate your thighs to increase intensity. "
  66. elif result["standard"]["level"]==3:
  67. return "High leg lift is not enough, more practice thigh strength. "
  68. else:
  69. return "Check out some video to learn about standard postures and work on your thigh and calf muscles"