year 11 python

year 11 python
1 / 13
next
Slide 1: Slide
ComputingUpper Secondary (Key Stage 4)GCSE

This lesson contains 13 slides, with text slides.

time-iconLesson duration is: 60 min

Items in this lesson

year 11 python

Slide 1 - Slide

do now


What is an embedded system?
How do you multiply a binary number?
What is the name of the search where a list is divided in half?
What are the three SQL key words?

Slide 2 - Slide

Slide 3 - Slide

Slide 4 - Slide

Teacher input

6 data types:

  • "String"
  • integer - whole number
  • Real - decimal number
  • Float - decimal number
  • Boolean - True/False
  • Character - Single character e.g. H

Slide 5 - Slide

Slide 6 - Slide

Slide 7 - Slide

Teacher input

Basic progamming language:

  • variable = input("ask a question?") - input statement
  • print(something) - output text or a variable
  • def functionName(parameter): - declare a function
  • functionName() - call a function
  • if (var > 2): - selection in code checks a condition
  • else: - what happens if the condition is not met or false
  • while ( var <= 25): - iteration repeats until condition is met.
  • for ( i = 5): - iteration for a controlled amount of times.

Slide 8 - Slide

Slide 9 - Slide

We do

The height a student jumps in the high jump needs to be input and validated.
The height is entered in centimetres (cm) and must be between 40.0 and 180.0 inclusive.
Write an algorithm to:
Each data type must be different.
• take the height jumped as input
• output "VALID" or "NOT VALID" depending on the height input.
You must use either:
• OCR Exam Reference Language, or
• A high-level programming language that you have studied.
[4]
The algorithm is tested using a range of tests.
Complete the table to identify an example of test data for each type of test.
Test data
(height jumped in cm) Type of test Expected output
Normal "VALID"
Boundary "VALID"
Erroneous "NOT VALID"
[3]

Slide 10 - Slide

Slide 11 - Slide

Slide 12 - Slide

The individual results for each student in each event are stored in a database.
The database table TblResult stores the times of students in the 100 m race. Some of the data is shown:








Complete the SQL statement to show the Student ID and team name of all students who are in year group 11
SELECT StudentID, .................................................
FROM ..............................................................
WHERE ...................................................................






StudentID
YearGroup
TeamName
Time
11GC1
11
Valiants
20.3
10VE1
10
super-team
19.7
10SM1
10
super-team
19.2
11JP2
11
champions
19.65

Slide 13 - Slide