SlideShare a Scribd company logo
Random Numbers, Drawing, and Tying it all together
Project Status
 Please give a brief explanation of your project
 What it is
 What you want to accomplish
 What programming tools you are using
 Loops
 Ifs
 User Input
 Something else?
Random Numbers
 random_choice = random.randint(1,3)
if random_choice == 1:
sprite = codesters.Sprite("rock“)
Random Numbers
 What can you do with these?
 Dice games
 Randomly generated stories
 Random backgrounds or sprites
 Choose a random item from a list
 Many games you play use random numbers!
Drawing with Sprites
 sprite.pen_down()
 Start drawing
 sprite.set_color("red")
 Ink color
 sprite.fill_on()
 Color in the shape as you go (optional)
 sprite.pen_up()
 Stop drawing
Demo Time!
Tying it all together
 A good program will use several of the concepts we
learned
 Games
 Stories
 Let’s look at some of the project ideas in Intro to
Python 2!
Demo Time!
Tying it all together
 Are there any concepts from the past 3 weeks that you
want more info on?
 Loops
 If/Elif/Else
 Syntax
 User Input
 Etc
For Next Week
 Keep working on your projects!
 Next week the entire class will be dedicated to project
work, so bring any questions or problems and be ready
to work through them!

More Related Content

PPTX
Intro to python
PPTX
The Lesser Known Stars of the Tidyverse
PPTX
Programming Challenge
PDF
Data variables
DOCX
Magic 8 ball putting it all together
PDF
Questions4
PPTX
PDF
cos 102 - getting into programming with python.pdf
Intro to python
The Lesser Known Stars of the Tidyverse
Programming Challenge
Data variables
Magic 8 ball putting it all together
Questions4
cos 102 - getting into programming with python.pdf

Similar to Intro to python3 (20)

PPTX
Python 101++: Let's Get Down to Business!
DOCX
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
PPTX
CMSC 201 - Lec19 - Modules and Random Numbers.pptx
PDF
Intro to Python
PDF
Introduction to python
PPTX
Python 101: Python for Absolute Beginners (PyTexas 2014)
DOCX
Python Math Concepts Book
PDF
NPTEL_SEM_3.pdf
PPTX
Python Workshop - Learn Python the Hard Way
PPTX
Intro to python2
PDF
Python Part 1
PDF
Python bootcamp - C4Dlab, University of Nairobi
PPTX
NPTEL complete.pptx.pptx
PPTX
Teaching Deck_Coding Algorithms_V2.3.pptx
PPTX
Teaching Deck_Coding Algorithms_V2.3.pptx
PDF
Arduino creative coding class part iii
PDF
Python for Beginners - Simply understand programming concepts
PDF
Teach your kids how to program with Python and the Raspberry Pi
PDF
Class 4: For and while
Python 101++: Let's Get Down to Business!
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
CMSC 201 - Lec19 - Modules and Random Numbers.pptx
Intro to Python
Introduction to python
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python Math Concepts Book
NPTEL_SEM_3.pdf
Python Workshop - Learn Python the Hard Way
Intro to python2
Python Part 1
Python bootcamp - C4Dlab, University of Nairobi
NPTEL complete.pptx.pptx
Teaching Deck_Coding Algorithms_V2.3.pptx
Teaching Deck_Coding Algorithms_V2.3.pptx
Arduino creative coding class part iii
Python for Beginners - Simply understand programming concepts
Teach your kids how to program with Python and the Raspberry Pi
Class 4: For and while
Ad

Recently uploaded (20)

PPTX
master seminar digital applications in india
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Lesson notes of climatology university.
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Complications of Minimal Access Surgery at WLH
PDF
Classroom Observation Tools for Teachers
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
master seminar digital applications in india
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
GDM (1) (1).pptx small presentation for students
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Computing-Curriculum for Schools in Ghana
O5-L3 Freight Transport Ops (International) V1.pdf
Pharma ospi slides which help in ospi learning
Lesson notes of climatology university.
Chinmaya Tiranga quiz Grand Finale.pdf
A systematic review of self-coping strategies used by university students to ...
O7-L3 Supply Chain Operations - ICLT Program
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Complications of Minimal Access Surgery at WLH
Classroom Observation Tools for Teachers
102 student loan defaulters named and shamed – Is someone you know on the list?
Supply Chain Operations Speaking Notes -ICLT Program
STATICS OF THE RIGID BODIES Hibbelers.pdf
Microbial diseases, their pathogenesis and prophylaxis
Ad

Intro to python3

  • 1. Random Numbers, Drawing, and Tying it all together
  • 2. Project Status  Please give a brief explanation of your project  What it is  What you want to accomplish  What programming tools you are using  Loops  Ifs  User Input  Something else?
  • 3. Random Numbers  random_choice = random.randint(1,3) if random_choice == 1: sprite = codesters.Sprite("rock“)
  • 4. Random Numbers  What can you do with these?  Dice games  Randomly generated stories  Random backgrounds or sprites  Choose a random item from a list  Many games you play use random numbers!
  • 5. Drawing with Sprites  sprite.pen_down()  Start drawing  sprite.set_color("red")  Ink color  sprite.fill_on()  Color in the shape as you go (optional)  sprite.pen_up()  Stop drawing
  • 7. Tying it all together  A good program will use several of the concepts we learned  Games  Stories  Let’s look at some of the project ideas in Intro to Python 2!
  • 9. Tying it all together  Are there any concepts from the past 3 weeks that you want more info on?  Loops  If/Elif/Else  Syntax  User Input  Etc
  • 10. For Next Week  Keep working on your projects!  Next week the entire class will be dedicated to project work, so bring any questions or problems and be ready to work through them!