Rédigé par des étudiants ayant réussi Disponible immédiatement après paiement Lire en ligne ou en PDF Mauvais document ? Échangez-le gratuitement 4,6 TrustPilot
logo-home
Resume

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

Note
-
Vendu
-
Pages
10
Publié le
27-08-2025
Écrit en
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.

Montrer plus Lire moins
Établissement
Cours

Aperçu du contenu

‭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‬

Livre connecté

École, étude et sujet

Cours

Infos sur le Document

Livre entier ?
Non
Quels chapitres sont résumés ?
Chapter 8
Publié le
27 août 2025
Nombre de pages
10
Écrit en
2025/2026
Type
RESUME

Sujets

€9,77
Accéder à l'intégralité du document:

Mauvais document ? Échangez-le gratuitement Dans les 14 jours suivant votre achat et avant le téléchargement, vous pouvez choisir un autre document. Vous pouvez simplement dépenser le montant à nouveau.
Rédigé par des étudiants ayant réussi
Disponible immédiatement après paiement
Lire en ligne ou en PDF

Faites connaissance avec le vendeur
Seller avatar
hengclaudia

Faites connaissance avec le vendeur

Seller avatar
hengclaudia Hilti Group
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
-
Membre depuis
7 mois
Nombre de followers
0
Documents
2
Dernière vente
-

0,0

0 revues

5
0
4
0
3
0
2
0
1
0

Documents populaires

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions