Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Resumen

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

Puntuación
-
Vendido
-
Páginas
10
Subido en
27-08-2025
Escrito 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.

Mostrar más Leer menos
Institución
Grado

Vista previa del contenido

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

Libro relacionado

Escuela, estudio y materia

Grado

Información del documento

¿Un libro?
No
¿Qué capítulos están resumidos?
Chapter 8
Subido en
27 de agosto de 2025
Número de páginas
10
Escrito en
2025/2026
Tipo
RESUMEN

Temas

$10.99
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor
Seller avatar
hengclaudia

Conoce al vendedor

Seller avatar
hengclaudia Hilti Group
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
-
Miembro desde
7 meses
Número de seguidores
0
Documentos
2
Última venta
-

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Documentos populares

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes