GRADE-11 C1
| Activity Flow | Slide No. | Topic | Time |
|---|---|---|---|
| TA | 3 | Ice-breaker | 1 min |
| 5-10 | Programming Intro | 2 min | |
| 11-16 | Object Oriented Programming | 3 min | |
| 17-22 | Introduction to Python + Spyder + Pygame | 3 min | |
| 23-28 | TA - Coding | 15 | |
| SA | 29-31 | SA | 5 min |
| Wrap - Up | 32-36 | Quiz | 1 min |
| 38 | Additional Activity | 5 min |
| Slide No. | Topic |
|---|---|
| 11 | Random number code |
| 23-25 | Basic pygame code |
| 31-32 | Making rectangles |
| 36 | SA Code- Creating enemy rect. |
| 45 | Additional Activity- Code |
PRE REQUISITES
FOR TEACHER
Computer with internet connection
Latest browser installed
Spyder installed
Projector to present screen
FOR STUDENTS
Computer with internet connection
Latest browser installed
B
B
B
B
B
B
B
B
B
B
Integrated development environment (IDE)
B
B
B
import pygame
B
import pygame
pygame.init()import pygame
pygame.init()
screen = pygame.display.set_mode((400,600))B
import pygame
pygame.init()
screen = pygame.display.set_mode((400,600))
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()B
B
import pygame
pygame.init()
screen = pygame.display.set_mode((400,600))
paddle=pygame.Rect(200,500,30,10)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()B
B
B
B
import pygame
pygame.init()
screen = pygame.display.set_mode((400,600))
paddle=pygame.Rect(200,500,30,30)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.draw.rect(screen,(23,100,100),paddle)
pygame.display.update()B
B
B
import pygame
pygame.init()
screen = pygame.display.set_mode((400,600))
paddle=pygame.Rect(200,500,30,30)
ball=pygame.Rect(70,50,10,10)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.draw.rect(screen,(23,100,100),paddle)
pygame.draw.rect(screen,(255,255,255),ball)
pygame.display.update()We first pass the surface, then the color, then the name of the rectangle
RGB stands for red green blue. Each color that we use can be represented as a combination of these 3 colors in varying percentages.
| Activity | Activity Name | Link |
|---|---|---|
| Teacher Activity 1 | Paddle creation | tinyurl.com/2ce8cctx |
| Student Activity 1 | Ball creation | https://tinyurl.com/fmsuy4pp |
| Additional Activity 1- Solution | Ball creation_AA | https://tinyurl.com/ymx5pu7m |