0% found this document useful (0 votes)
23 views34 pages

04-Milestone Project 1

The document outlines the preparation for a milestone project in a Python Bootcamp, specifically focusing on creating an interactive Tic Tac Toe game. It includes exercises on user input, variable manipulation, and visual representation, leading to the development of a simple interactive program. The project aims to enhance programming skills by guiding participants through the creation of a fully functional game for two players.

Uploaded by

jrmelania4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views34 pages

04-Milestone Project 1

The document outlines the preparation for a milestone project in a Python Bootcamp, specifically focusing on creating an interactive Tic Tac Toe game. It includes exercises on user input, variable manipulation, and visual representation, leading to the development of a simple interactive program. The project aims to enhance programming skills by guiding participants through the creation of a fully functional game for two players.

Uploaded by

jrmelania4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Warm Up

Project Exercises
Complete Python Bootcamp

● We’re almost ready for you to begin


creating a full, interactive Python program.
● For your upcoming milestone project you
will be creating an interactive Tic Tac Toe
game!
Complete Python Bootcamp

● In order to “warm up” for this project,


we’re going to code along with a few
exercises in order for you to see how to
use Python code to the following:
○ Grab user input
○ Manipulate a variable based on input
○ Return back adjusted variable
Complete Python Bootcamp

Visual
Representatio
n
Complete Python Bootcamp

Visual
Representatio
n
Complete Python Bootcamp

Visual
Representatio
n
User
Input
Complete Python Bootcamp

Visual
Representatio
n
User
Input
Complete Python Bootcamp

Visual Function
Representatio
n
User
Input
Complete Python Bootcamp

Visual Function
Representatio
n
User
Input Updates
Complete Python Bootcamp

Visual Function
Representatio
n
User
Input Updates

New
Visual
Complete Python Bootcamp

Updated Function
Visual
Representatio
n User
Input Updates

New
Visual
Complete Python Bootcamp

● Most programs that are interactive work on


this very simple idea.
○ Display something visual to the user
○ Let the user update through an
interaction
○ Update variables in the program
○ Display updated visual
Complete Python Bootcamp

● In the next series of short lectures, we will


guide you through examples of how to
perform these tasks with Python.
● Keep in mind, there are many different
ways of performing the same task, so don’t
feel restricted by the examples we show
here.
Displaying
Information
Accepting
User Input
Validating
User Input
Complete Python Bootcamp

● We’ve seen how to use input() to interact


with a user and how to convert the string
data type into another type, such as an
integer.
● Let’s now explore how to further validate
user input to avoid errors for invalid
conversions.
Simple User
Interaction
Complete Python Bootcamp

● To put everything together, let’s create a


simple interactive program.
● The program will
○ Display a list
○ Have a user choose an index position
and an input value
○ Replace value at index position with
user’s chosen input value
Complete Python Bootcamp

● Let’s see what the finished game looks


like, and then construct it ourselves using
the functions we’ve already made!
Milestone Project 1
Overview
Complete Python Bootcamp

● By now you should have gone through the


“warm-up” project, covering:
○ Displaying Information
○ Accepting and Validating Input
○ Simple User Interactions
Complete Python Bootcamp

● You now know enough to create a real


program!
● For your first milestone project you will
create a Tic Tac Toe game for 2 human
players.
● Let’s describe what the game will be like...
Complete Python Bootcamp

● 2 players should be able to play the game


(both sitting at the same computer)
● The board should be printed out every
time a player makes a move
● You should be able to accept input of the
player position and then place a symbol on
the board
Complete Python Bootcamp

We will use the “numpad” to match numbers


to the grid on a tic tac toe board:
Complete Python Bootcamp

We will use the “numpad” to match numbers


to the grid on a tic tac toe board:

7 8 9
4 5 6
1 2 3
Complete Python Bootcamp

We will use the “numpad” to match numbers


to the grid on a tic tac toe board:

7 8 9
4 5 6
1 2 3
Complete Python Bootcamp

We will use the “numpad” to match numbers


to the grid on a tic tac toe board:

1
Complete Python Bootcamp

We will use the “numpad” to match numbers


to the grid on a tic tac toe board:

X
Complete Python Bootcamp

We will use the “numpad” to match numbers


to the grid on a tic tac toe board:

X
Complete Python Bootcamp

We will use the “numpad” to match numbers


to the grid on a tic tac toe board:

X
Complete Python Bootcamp

● Creating your first full program is always a


big leap, but you will come out the other
end a much better programmer!
● We’ve set up a walkthrough notebook for
you to help guide you along with the
functions you will need to create.
Complete Python Bootcamp

● Let’s explore what the game will look like


once it is done
● We’ll also cover a few useful functions and
go through the walkthrough notebook.
● Let’s get started!
Milestone Project 1
Solutions for
Workbook

You might also like