TORONTO KIDS COMPUTER CLUB | Wednesday 17:00 Python Practice – 22.04.06.
20527
post-template-default,single,single-post,postid-20527,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Wednesday 17:00 Python Practice – 22.04.06.

08 Apr Wednesday 17:00 Python Practice – 22.04.06.

Question 1:
Create a loop between 1 to 20.

  • Print “fizz” if the number is divisible by 3
  • Print “bizz” if the number is divisible by 5
  • Print “fizzbizz” if a number is divisible by both 3 and 5.
  • Otherwise, print the number itself.

Question 2:
Continue modify the war-robot program we made in the class, so that:

  • if enemy’s hp is lower or equal to 0, use msgbox to display message ‘you win’, and the while program finish.
  • it will be the enemy’s turn to strike you back. Enemy can only use gun to fire and cause damage between 50-90.
  • after enemy’s turn, if your hp is lower or equal to 0, use msgbox to display message ‘you lose’, and the while program finish.
No Comments

Sorry, the comment form is closed at this time.