0% found this document useful (0 votes)
20 views5 pages

Class Notes

The document compares Scratch and Python programming languages, highlighting their differences in coding methods, difficulty levels, and purposes. It also covers essential programming concepts such as variables, data types, algorithms, error detection, and the role of software. Additionally, it introduces smart devices and automation in computing.

Uploaded by

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

Class Notes

The document compares Scratch and Python programming languages, highlighting their differences in coding methods, difficulty levels, and purposes. It also covers essential programming concepts such as variables, data types, algorithms, error detection, and the role of software. Additionally, it introduces smart devices and automation in computing.

Uploaded by

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

G7 Computer Science

SCRATCH VS PYTHOn

Block-Based Programming : Programming using drag and drop blocks

Value : a number that can be used in a programming language

Text-Based programming : programming that requires the programmer to type text

Flowchart : a diagram showing the sequence of actions in a computer program, a


graphical representation to show steps to solve a problem

Arithmetic operator : +, -, *, / and other symbols that can be used for arithmetic
calculations,

Graphical user interface : also known as GUI is used to interact with a computer using
icons and menus

Syntax : the structure of the code in a programming language

Integrated Development and Learning Environment (IDLE) : an environment used to


program in python

Script mode : pythons text editor which allows programmers to enter a list of
commands and they are executed together.

Comments : text entered by a programer to improve the readability of code

Variable :a named memory location used to store data of a given type during program
execution, a variable can change value as the program runs.
2

Differences of python and scratch :

1.​ How You Code:


○​ Python: You type out the code (text based)
○​ Scratch: You use blocks that you drag and snap together.
2.​ Difficulty:
○​ Python: It can be harder to learn because you need to know the correct
words and rules.
○​ Scratch: Easier for beginners since it uses already coded blocks.
3.​ Purpose:
○​ Python: Used for many things like making apps, websites, or working with
data.
○​ Scratch: Mostly for making simple games, animations, and learning
coding basics.

Similarities :

1.​ Basic Ideas: Both are programming languages


2.​ Works Everywhere: Both can run on different computers and systems, like
Windows, Mac, or online.

Input () is used to take input from a user. If you wish to store this input you need to
assign it to a variable

E.g : name = input (“What is your name?”)

print (“Hello”, name)

Data type : the different ways in which data can be stored

String : Any textual characters such as “Hello”

Integer : Any whole number such as 23

Float : any number with a decimal point, for example 2.13

Casting : the process of ensuring that data is set to the correct data type
3

CASTING :​
Integer - X = int(input(“Enter a Number”))

Float - Y=float(input("Enter a Decimal Number"))

String - Z=str(input("Enter a word"))

FLOWCHARTS AND ALGORITHMS

Algorithm : a sequence of steps or instructions to solve a problem

Flowchart : a diagram showing the sequence of actions in a computer program, a


graphical representation to show steps to solve a problem

BIDMAS
4

ERROR DETECTION AND CORRECTION

You can check for errors/bugs using a test plan. Common errors you might encounter
include :

●​ MISSING BRACKETS
●​ MISSING QUOTATION MARKS
●​ VARIABLE NAMING MISMATCHES
●​ VARIABLES NOT CAST TO CORRECT DATA TYPE

Debug : The process of identifying and removing errors from a computer program

MAKING CHOICES IF THEN ELSE IN FLOWCHARTS

Selection : outcome of a condition

Condition : something that is checked to determine whether it is true or false.

CREATING A SMART SOLUTION

Automate : to make something that was done manually, automatic using technology.

Sensor : a device that is able to gather data from its surroundings to respond to or
record

Smart device : a device that utilises sensors and is connected to other devices

Physical computing device : a small microprocessor that can be programmed using


block or text based programming languages.

Prototype : sample, first model

Accelerometer : a sensor to detect movement

Comparison operators : >, <, >=,<=

Test plan : a structured approach to testing whether your solution works as expected

Two kinds of Software :

System Software and Application Software


5

System software is the software that all computers have and it makes the system work
as expected.

Web browser : a software application that allows users to locate, access and display
information on the world wide web

General purpose software : software used for more than one purpose

You might also like