SlideShare a Scribd company logo
SCRATCH TO PYTHON PROGRAMMING
Overview: Some questions that need answering
•Scratch is a good basic tool to get
visually pleasing animations running with
little working time.
•However we have to ask; "Who actually
made scratch?", "How was it made?".
•The programming world is much bigger
than Scratch. Real projects use a lot of
different languages working together -
And a lot of different people working
together.
•Are there other languages out there?
Basic differences between Scratch and Python
In Scratch each sprite has it's own code. Sprites interact
with each other through shared resources such as
variables and messages. This is often confusing and
leads to poorly maintainable code.
In Python each line of code is read by a Python
"Interpreter" and the computer executes the
instructions directly and in sequential order.
Basic differences between Scratch and Python
In Scratch each block is read in sequential order. The
code starts with an event or "Hat" block. Placing blocks
within outer "C" blocks is used to group blocks together.
Each sprite has its own set of blocks which may or may
not interact with each other.
In Python every line is read; line by line from top to
bottom, reading each line from left to right, evaluating
each statement in turn and if necessary assigning its
return value to a variable. Indentation groups
statements together.
Lets see how our familiar Scratch code looks in Python...
Variables
Scratch: In Python variables have to be given an initial value:
Arithmetic
Scratch:
In Python the modulus operator or "mod" is
symbolised by a "%" symbol. We use it to get the
remainder of a division
Operators
Scratch: Python:
Conditionals
Scratch: Python:
Loops
Scratch: Python:
Random Numbers
Scratch: Python:
Random is a whole library of functions.

We have so much more we can do with random numbers in Python than in Scratch!
Lists
Scratch: Python:
Let’s add some objects to our lists
or
Lists in Python start at index 0
Lists
Scratch: Python:
We can do so much more in Python than in Scratch. We can
sort the list, reverse the order of the list etc...
Functions
Scratch: Python:
“But Python is boring. I want to make games in Scratch”
You can make games in Python.

You could remake the entire Scratch interface using Python if you really wanted to.

Here are some examples of some games that utilise the PyGame library. But you need to build up
your skill level and master the basics before you attempt large projects.
What else is Python used for?
Python is actually not used that often for making games as it has many "resource intensive" features. When used
correctly, you will rarely run into limitations with these features and they will in fact speed up how long it takes you to
write code!

Python is often used for data analytics in the STEM community although this definitely not the only use for Python.. Some
common packages used by these communities include NumPy, SciPy and Matplotlib but there are MANY MORE...

You can write your own library and share with the community...
This is why we use Python, it is highly extensible and has a massive user base.
It is a good general purpose programming language to learn!
Some famous services that utilise Python in
their code base
TIOBE index for various programming
languages in August 2017
Emily De La Peña
Founder of Coding Kids, Advance Queensland’s Community Digital Champion
codingkids.com.au
facebook.com/codingkidstutoring
@EmilyFdelaPena & @coding_kids
linkedin.com/in/emilydelapena/
@emily.f.delapena

More Related Content

What's hot

Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
afsheenfaiq2
 
Introduction to scratch programming
Introduction to scratch programmingIntroduction to scratch programming
Introduction to scratch programming
Patrick John McGee
 
Scratch Animation
Scratch AnimationScratch Animation
Scratch Animation
Anjan Mahanta
 
Scratch programming
Scratch programmingScratch programming
Scratch programming
YvonieDoria
 
Introduction to Scratch Programming
Introduction to Scratch ProgrammingIntroduction to Scratch Programming
Introduction to Scratch Programming
StorytimeSteph
 
Programming in scratch
Programming in scratchProgramming in scratch
Programming in scratch
Hussam Mostafa
 
Scratch for intermediates course
Scratch for intermediates courseScratch for intermediates course
Scratch for intermediates course
Matthew Parry
 
Scratch Lesson 1
Scratch Lesson 1Scratch Lesson 1
Scratch Lesson 1
Vadim Axelrod
 
Python programming
Python  programmingPython  programming
Python programming
Ashwin Kumar Ramasamy
 
Intro To Scratch
Intro To ScratchIntro To Scratch
Intro To Scratch
Patrick Woessner
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
Samir Mohanty
 
scratch.pptx
scratch.pptxscratch.pptx
scratch.pptx
DeepikaArya21
 
Scratch Lesson 1 – Basics
Scratch Lesson 1 – BasicsScratch Lesson 1 – Basics
Scratch Lesson 1 – BasicsDavid Oromaner
 
Python ppt
Python pptPython ppt
Python ppt
Mohita Pandey
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python Programming
Kamal Acharya
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
Swarit Wadhe
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
St. Petersburg College
 
Tinkercad: The Basics
Tinkercad: The BasicsTinkercad: The Basics
Tinkercad: The Basics
Rohan Karunaratne
 
Python by Rj
Python by RjPython by Rj

What's hot (20)

Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Introduction to scratch programming
Introduction to scratch programmingIntroduction to scratch programming
Introduction to scratch programming
 
Scratch Animation
Scratch AnimationScratch Animation
Scratch Animation
 
Scratch programming
Scratch programmingScratch programming
Scratch programming
 
Introduction to Scratch Programming
Introduction to Scratch ProgrammingIntroduction to Scratch Programming
Introduction to Scratch Programming
 
Programming in scratch
Programming in scratchProgramming in scratch
Programming in scratch
 
Scratch for intermediates course
Scratch for intermediates courseScratch for intermediates course
Scratch for intermediates course
 
Scratch Lesson 1
Scratch Lesson 1Scratch Lesson 1
Scratch Lesson 1
 
Python programming
Python  programmingPython  programming
Python programming
 
Intro To Scratch
Intro To ScratchIntro To Scratch
Intro To Scratch
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
 
scratch.pptx
scratch.pptxscratch.pptx
scratch.pptx
 
Scratch Lesson 1 – Basics
Scratch Lesson 1 – BasicsScratch Lesson 1 – Basics
Scratch Lesson 1 – Basics
 
Python ppt
Python pptPython ppt
Python ppt
 
Scratch Project
Scratch ProjectScratch Project
Scratch Project
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python Programming
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
 
Tinkercad: The Basics
Tinkercad: The BasicsTinkercad: The Basics
Tinkercad: The Basics
 
Python by Rj
Python by RjPython by Rj
Python by Rj
 

Similar to Looking at how Scratch and Python compare

Raspberry pi education_manual
Raspberry pi education_manualRaspberry pi education_manual
Raspberry pi education_manual
Try Fajarman
 
Pythonlearn-01-Intro.pptx
Pythonlearn-01-Intro.pptxPythonlearn-01-Intro.pptx
Pythonlearn-01-Intro.pptx
MrHackerxD
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming LanguageLaxman Puri
 
Python A Comprehensive Guide for Beginners.pdf
Python A Comprehensive Guide for Beginners.pdfPython A Comprehensive Guide for Beginners.pdf
Python A Comprehensive Guide for Beginners.pdf
Kajal Digital
 
Py4 inf 01-intro
Py4 inf 01-introPy4 inf 01-intro
Py4 inf 01-intro
Ishaq Ali
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its Applications
Abhijeet Singh
 
Pythonanditsapplications 161121160425
Pythonanditsapplications 161121160425Pythonanditsapplications 161121160425
Pythonanditsapplications 161121160425
Sapna Tyagi
 
Python_Introduction&DataType.pptx
Python_Introduction&DataType.pptxPython_Introduction&DataType.pptx
Python_Introduction&DataType.pptx
HaythamBarakeh1
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
SudhanshiBakre1
 
Introduction_to_Python.pptx
Introduction_to_Python.pptxIntroduction_to_Python.pptx
Introduction_to_Python.pptx
Vinay Chowdary
 
Python for MATLAB Programmers
Python for MATLAB ProgrammersPython for MATLAB Programmers
Python for MATLAB Programmers
Michael Patterson
 
Why should I learn python
Why should I learn pythonWhy should I learn python
Why should I learn python
grinu
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Rajesh Rajamani
 
Top Libraries for Machine Learning with Python
Top Libraries for Machine Learning with Python Top Libraries for Machine Learning with Python
Top Libraries for Machine Learning with Python
Chariza Pladin
 
Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)
Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)
Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)
Joxean Koret
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysis
Pramod Toraskar
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
lemonchoos
 
Python standard library & list of important libraries
Python standard library & list of important librariesPython standard library & list of important libraries
Python standard library & list of important libraries
grinu
 
Which programming language to learn R or Python - MeasureCamp XII
Which programming language to learn R or Python - MeasureCamp XIIWhich programming language to learn R or Python - MeasureCamp XII
Which programming language to learn R or Python - MeasureCamp XII
Maggie Petrova
 

Similar to Looking at how Scratch and Python compare (20)

Raspberry pi education_manual
Raspberry pi education_manualRaspberry pi education_manual
Raspberry pi education_manual
 
Raspberry pi education_manual
Raspberry pi education_manualRaspberry pi education_manual
Raspberry pi education_manual
 
Pythonlearn-01-Intro.pptx
Pythonlearn-01-Intro.pptxPythonlearn-01-Intro.pptx
Pythonlearn-01-Intro.pptx
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Python A Comprehensive Guide for Beginners.pdf
Python A Comprehensive Guide for Beginners.pdfPython A Comprehensive Guide for Beginners.pdf
Python A Comprehensive Guide for Beginners.pdf
 
Py4 inf 01-intro
Py4 inf 01-introPy4 inf 01-intro
Py4 inf 01-intro
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its Applications
 
Pythonanditsapplications 161121160425
Pythonanditsapplications 161121160425Pythonanditsapplications 161121160425
Pythonanditsapplications 161121160425
 
Python_Introduction&DataType.pptx
Python_Introduction&DataType.pptxPython_Introduction&DataType.pptx
Python_Introduction&DataType.pptx
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Introduction_to_Python.pptx
Introduction_to_Python.pptxIntroduction_to_Python.pptx
Introduction_to_Python.pptx
 
Python for MATLAB Programmers
Python for MATLAB ProgrammersPython for MATLAB Programmers
Python for MATLAB Programmers
 
Why should I learn python
Why should I learn pythonWhy should I learn python
Why should I learn python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Top Libraries for Machine Learning with Python
Top Libraries for Machine Learning with Python Top Libraries for Machine Learning with Python
Top Libraries for Machine Learning with Python
 
Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)
Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)
Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysis
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
Python standard library & list of important libraries
Python standard library & list of important librariesPython standard library & list of important libraries
Python standard library & list of important libraries
 
Which programming language to learn R or Python - MeasureCamp XII
Which programming language to learn R or Python - MeasureCamp XIIWhich programming language to learn R or Python - MeasureCamp XII
Which programming language to learn R or Python - MeasureCamp XII
 

Recently uploaded

Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
nhiyenphan2005
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 

Recently uploaded (20)

Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 

Looking at how Scratch and Python compare

  • 1. SCRATCH TO PYTHON PROGRAMMING
  • 2. Overview: Some questions that need answering •Scratch is a good basic tool to get visually pleasing animations running with little working time. •However we have to ask; "Who actually made scratch?", "How was it made?". •The programming world is much bigger than Scratch. Real projects use a lot of different languages working together - And a lot of different people working together. •Are there other languages out there?
  • 3. Basic differences between Scratch and Python In Scratch each sprite has it's own code. Sprites interact with each other through shared resources such as variables and messages. This is often confusing and leads to poorly maintainable code. In Python each line of code is read by a Python "Interpreter" and the computer executes the instructions directly and in sequential order.
  • 4. Basic differences between Scratch and Python In Scratch each block is read in sequential order. The code starts with an event or "Hat" block. Placing blocks within outer "C" blocks is used to group blocks together. Each sprite has its own set of blocks which may or may not interact with each other. In Python every line is read; line by line from top to bottom, reading each line from left to right, evaluating each statement in turn and if necessary assigning its return value to a variable. Indentation groups statements together.
  • 5. Lets see how our familiar Scratch code looks in Python...
  • 6. Variables Scratch: In Python variables have to be given an initial value:
  • 7. Arithmetic Scratch: In Python the modulus operator or "mod" is symbolised by a "%" symbol. We use it to get the remainder of a division
  • 11. Random Numbers Scratch: Python: Random is a whole library of functions.
 We have so much more we can do with random numbers in Python than in Scratch!
  • 12. Lists Scratch: Python: Let’s add some objects to our lists or Lists in Python start at index 0
  • 13. Lists Scratch: Python: We can do so much more in Python than in Scratch. We can sort the list, reverse the order of the list etc...
  • 15. “But Python is boring. I want to make games in Scratch” You can make games in Python.
 You could remake the entire Scratch interface using Python if you really wanted to.
 Here are some examples of some games that utilise the PyGame library. But you need to build up your skill level and master the basics before you attempt large projects.
  • 16. What else is Python used for? Python is actually not used that often for making games as it has many "resource intensive" features. When used correctly, you will rarely run into limitations with these features and they will in fact speed up how long it takes you to write code!
 Python is often used for data analytics in the STEM community although this definitely not the only use for Python.. Some common packages used by these communities include NumPy, SciPy and Matplotlib but there are MANY MORE...
 You can write your own library and share with the community... This is why we use Python, it is highly extensible and has a massive user base. It is a good general purpose programming language to learn!
  • 17. Some famous services that utilise Python in their code base
  • 18. TIOBE index for various programming languages in August 2017
  • 19. Emily De La Peña Founder of Coding Kids, Advance Queensland’s Community Digital Champion codingkids.com.au facebook.com/codingkidstutoring @EmilyFdelaPena & @coding_kids linkedin.com/in/emilydelapena/ @emily.f.delapena