100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Summary IGCSE Computer Science (0478) Chapter 8: Programming - Clear & Concise Notes

Rating
-
Sold
-
Pages
10
Uploaded on
27-08-2025
Written in
2025/2026

This 10-page PDF guide covers all the essential topics for the programming section of the syllabus, including: Variables & Constants: Understand how to declare and use them in both pseudocode and Python. Data Types: A clear breakdown of INTEGER, REAL, STRING, CHAR, and BOOLEAN. Input & Output: Learn how to handle user input and display output effectively. Arithmetic & Logic Operators: Master the essential operators for calculations and decision-making. Selection: Detailed examples of IF...THEN...ELSE and CASE statements. Iteration: Clear explanations of FOR, WHILE, and REPEAT...UNTIL loops. Tottaling & Counting: Essential techniques for processing data. String Manipulation: Learn how to work with strings, including finding length and creating substrings. Subroutines: Understand the difference between Procedures and Functions, with and without parameters. Arrays: A comprehensive guide to both 1D and 2D arrays, from declaration to iteration. Library Routines: Key built-in functions like ROUND and RANDOM. -------------------------------------------------------------------------------------------------- Why you'll love these notes: Side-by-Side Examples: Instantly see the connection between pseudocode and Python code. Exam-Focused: Specifically tailored to the IGCSE 0478 Computer Science syllabus. Perfect for All Levels: Whether you're just starting or in your final revision stages, these notes will boost your confidence.

Show more Read less
Institution
Course










Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Course

Document information

Summarized whole book?
No
Which chapters are summarized?
Chapter 8
Uploaded on
August 27, 2025
Number of pages
10
Written in
2025/2026
Type
Summary

Subjects

Content preview

‭IGCSE Tuition - 0478 CS‬


‭8. Programming‬


‭8.1 Variables and Constants (Python)‬


‭Variable‬ ‭Constant‬

‭What is it?‬ ‭A named data store to contain a value‬

‭that can change‬ ‭that should stay fixed‬

‭When to use?‬ ‭ hen the data may change when the‬
W ‭ hen the data should NOT change‬
W
‭program runs‬ ‭throughout the program‬

‭How to use?‬ ‭Assign a value to it using the‬‭=‬‭sign‬

‭Naming: lowercase or snake_case‬ ‭Naming: ALL_CAPITAL_LETTERS‬

‭Example‬ ‭ core‬‭= 0‬
s ‭ I‬‭= 3.14159‬
P
‭score =‬‭score‬‭+ 5‬ ‭area =‬‭PI‬‭* 5 * 5‬
‭print(score)‬ ‭print(area)‬

‭ utput‬‭:‬
O ‭ utput‬‭:‬
O
‭5‬ ‭78.53975‬




‭Variables and Constants (Pseudocode)‬


‭Variable‬ ‭Constant‬

‭How to use?‬ ‭Declare a variable with data type using‬‭:‬‭sign‬
‭Assign a value to it using the‬‭←‬‭sign‬
‭Note: Constants do not need to be declared‬

‭Naming: PascalCase‬

‭Example‬ ‭ ECLARE‬‭StudentScore‬‭: INTEGER‬
D ‭CONSTANT‬‭InterestRate‬‭← 0.06‬
‭StudentScore‬‭← 90‬




‭Prepared by: Claudia Heng‬

,‭IGCSE Tuition - 0478 CS‬

‭8.2 Data Types‬


‭Pseudocode‬ ‭Python‬

‭INTEGER‬ ‭num_of_students = 1‬

‭REAL‬ ‭average_height = 165.5 (In Python, it is called‬‭float‬‭)‬

‭CHAR‬ ‭gender = “M” (In Python, there is no char data type, it is just‬‭string‬‭)‬

‭STRING‬ ‭student_name = “John Doe” (Either “” or ‘’)‬

‭BOOLEAN‬ ‭game_over = True / game_over = False‬




‭8.3 Input and Output‬


‭Example of input‬ ‭Pseudocode‬ ‭Python‬

‭Input without prompt‬ ‭ UTPUT‬‭“This is a Prompt”‬
O ‭surprise =‬‭input()‬
‭INPUT‬‭VariableName‬
‭Input for string‬ ‭first_name =‬‭input(‬‭“Enter your first name: ”‬‭)‬

‭Input for number/integer‬ ‭age =‬‭int(‬‭input(‬‭“Enter your age: “‬‭)‭)‬ ‬

‭Input for decimal/float‬ ‭weight =‬‭float(‬‭input(‬‭“Enter your weight: “‬‭)‬‭)‬



‭Note‬‭: You always assign a variable to the input to‬‭store the result of your input, e.g, when a user types‬
‭something to answer to your prompt, you need a storage, i.e., a variable.‬
‭Note‬‭: casting is when you convert 1 data type to another,‬‭using these functions: int(), float(), str(). input() by‬
‭default takes in the input as a string data type.‬




‭Prepared by: Claudia Heng‬

, ‭IGCSE Tuition - 0478 CS‬


‭Example of output‬ ‭Pseudocode‬ ‭Python‬

‭Output a string‬ ‭ ECLARE‬‭Name : STRING‬
D ‭ ame = "John Doe"‬
n
‭Name ← “John Doe”‬ ‭print(name)‬
‭OUTPUT‬‭Name‬ ‭or‬
‭or‬ ‭print("John Doe")‬
‭OUTPUT‬‭“John Doe”‬

‭Output a number/integer‬ ‭ ECLARE‬‭Age : INTEGER‬
D ‭ ge = 21‬
a
‭Age ← 21‬ ‭print(age)‬
‭OUTPUT‬‭Age‬

‭Output a decimal/float‬ ‭ ECLARE‬‭Height : REAL‬
D ‭ eight = 1.70‬
h
‭Height ← 1.70‬ ‭print(height)‬
‭OUTPUT‬‭Height‬

‭Output a boolean‬ ‭ ECLARE‬‭GameOver : BOOLEAN‬
D ‭ ame_over = True‬
g
‭GameOver ← TRUE‬ ‭print(game_over)‬
‭OUTPUT‬‭GameOver‬

‭ utput a combination of‬
O ‭ ECLARE‬‭Name : STRING‬
D ‭ ame = "John Doe"‬
n
‭string‬‭and a variable of‬‭string‬ ‭Name ← “John Doe”‬ ‭print(“Welcome!”, name)‬
‭data type‬ ‭OUTPUT‬‭“Welcome! ”, Name‬ ‭or‬
‭(String concatenation)‬
‭name = "John Doe"‬
‭print(“Welcome! ” + name)‬

‭ utput a combination of‬
O ‭ ECLARE‬‭Age : INTEGER‬
D ‭ ge = 21‬
a
‭string‬‭and a variable of‬ ‭Age ← 21‬ ‭print(“Your age is”, age)‬
‭integer‬‭data type‬ ‭OUTPUT‬‭“Your age is ”, Age‬ ‭or‬
‭age = 21‬
‭print(“Your age is ” +‬‭str(‬‭age‬‭)‭)‬ ‬

‭ utput a combination of‬
O ‭ ECLARE‬‭Height : REAL‬
D ‭ eight = 1.70‬
h
‭string and a variable of float‬ ‭Height ← 1.70‬ ‭print(“Your height is”, height)‬
‭data type‬ ‭OUTPUT‬‭“Your height is ”, Height‬ ‭or‬
‭height = 1.70‬
‭print(“Your height is ” +‬‭str(‬‭height‬‭)‬‭)‬



‭Note‬‭: You can use comma (,) or plus (+) sign to combine‬‭string with a data stored in variable, differences:‬
‭(i) comma adds a space automatically and plus does not, (ii) comma does not throw error when you combine‬
‭different data types whereas plus does, and you need to do casting each time)‬




‭Prepared by: Claudia Heng‬
$10.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
hengclaudia

Get to know the seller

Seller avatar
hengclaudia Hilti Group
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
3 months
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions