TORONTO KIDS COMPUTER CLUB | Blog
1815
paged,page-template,page-template-blog-large-image,page-template-blog-large-image-php,page,page-id-1815,paged-215,page-paged-215,ajax_fade,page_not_loaded,,no_animation_on_touch,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Blog

09 Sep Aurora Saturday 13:00 Python Practice 09.05.

Question 1: Using split and join function of the list to change string “green,red,yellow,blue,” into string: “green light* red light* yellow light* blue light* “ Hint: >>> vegetables = "carrots, potatoes, onions, leeks, celery" >>> # string.split(separator) will split the string by separator, for example: >>> vegetables = vegetables.split(", ") >>> print(vegetables) ['carrots', 'potatoes', 'onions',...

Read More

04 Sep PMCA Saturday 18:30 Python Homework 20.08.29.

Question: Design the game over screen as below: Remember below is how we create texts: gameOverFont = pygame.font.Font(None, 80) gameOverText = "Game Over" gameOverSurf = gameOverFont.render(gameOverText, 1, (255, 0, 0)) screen.blitgameOverSurf, [160, 200]) Please modify the below if statement in the code to display the game over screen: if is_game_over == True:    ...

Read More