You are on page 1of 16

WELCOME TO THE

DAY 60 OF
MASTERMINDS
AIM Learn with Fun

TIME 50 MINUTES

OBJECTIVE 1)To create a game in python.

NECESSARY TEACHER TOOLS


TOOLS 1)Teacher to open a repl.it id.
2)Tell Student to open a repl.it id.
STUDENT TOOLS
1)Earphone with mic.
2)Notepad and pen if needed.

TIME WARM UP 05 Mins


TEACHER’S ACTIVITY 15 Mins
STUDENT’S ACTIVITY 25 Mins
WRAP UP 05 Mins
WARM UP

Hello!

How are you?

Did you have practiced last class Homework? Any doubts?

Wait for student response.

Did you played rock, paper, scissor game?

Wait for student response.

So today let’s replicate the same concept and create the game to play with
computer.so are you ready?
TEACHER INITIATES SCREEN
SHARE HERE
Let’s first frame the requirement here-

1) Import random module.


2) Use loop.
3) Create list.
4) Create variables to store index(random index).
5) Create variable to store user choice.
6) Use if else or elif also to give multiple condition.
7) Add the score if wins.
1)We have imported random module.
2)Then we have created 2 variables and assigned 0 to them initially.
3)use while loop to start the game.
4)Increase the value of chance by 1 after each iteration.
5)Create a list with the options.
6)Create a variable to store random index.
7) Computer will store of the following via random index in a
separate variable.
8)Give the user input() to choose any one among 3 options.
9)Print both the choices separately to compare.
This is how code will look after we follow the previous
instruction step by step-

Import random
module

Increase the value of chance variable by 1

Generate a random
number between 0 to 2

Take input from user .


10) Start comparing the values with all possible conditions.
11) Start with rock or scissor or paper and go with other two
each time and follow till it ends.
12) Use print() in order to show the output who wins.
13) Add the score if user wins.
14)Also mention tie,It’s your choice to add score when its tie.
This is how code will look after we follow the previous
instruction step by step-

Set the if
statement
according to the
game rule
15) Give line spaces for a better and a clear look.
16) show the score at last and also try to mention out of
chances occured.

LINK FOR THE PROGRAM


This is how code will look after we follow the previous
instruction step by step-
Output:-
TEACHER STOP SHARING
SCREEN HERE AND STUDENT
INITIATES SCREEN SHARE
Revision-

1) What is list?
2) Use of while loop.
3) Conditional statement.
4) Use of print().
Link for python platform-

https://repl.it/~
THANKYOU
YOU HAVE SUCCESSFULLY
COMPLETED DAY 60

You might also like