TORONTO KIDS COMPUTER CLUB | Tuesday Thursday 15:00 Python Practice 20.07.30.
18048
post-template-default,single,single-post,postid-18048,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Tuesday Thursday 15:00 Python Practice 20.07.30.

31 Jul Tuesday Thursday 15:00 Python Practice 20.07.30.

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 program we made in the class, so that:

  • after your robot hit the enemy, if enemy’s hp is lower or equal to 0, use msgbox to display message ‘You win’, and the whole program finish.
  • otherwise, it will be the enemy’s turn to strike you back. Enemy can only use gun to fire and cause damage between 50-80.
  • 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.