year 11 python

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

In deze les zitten 13 slides, met tekstslides.

time-iconLesduur is: 60 min

Onderdelen in deze les

year 11 python

Slide 1 - Tekstslide

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 - Tekstslide

Slide 3 - Tekstslide

Slide 4 - Tekstslide

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 - Tekstslide

Slide 6 - Tekstslide

Slide 7 - Tekstslide

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 - Tekstslide

Slide 9 - Tekstslide

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 - Tekstslide

Slide 11 - Tekstslide

Slide 12 - Tekstslide

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 - Tekstslide