Download presentation
Presentation is loading. Please wait.
Published byHillary Hopkins Modified over 7 years ago
1
GCSE COMPUTER SCIENCE Practical Programming using Python Lesson 14 – Challenges Set 1
2
The Challenges – Set 1 These challenges are designed to test how ready you are for the controlled assessment. There are a total of 30 challenges with varying difficulty. Each challenge tells you the lessons you need to reference to complete it successfully. EASY 9 challenges Setting Up Create a folder called Challenges Set 1 inside your C2 folder and save all the programs inside it. MEDIUM 11 challenges HARD 5 challenges VERY HARD 5 challenges
3
Challenge 1 Overview You will need to use: Write a program that asks the user to input their age and outputs “Your age is“ followed by their age. Sequencing Variables Difficulty EASY
4
Challenge 1 Code Screenshot Program Screenshot
5
Challenge 2 Overview You will need to use: Write a program that asks the user to input two numbers, calculates the average outputs it. Sequencing Variables Difficulty EASY
6
Challenge 2 Code Screenshot Program Screenshot
7
Challenge 3 Overview You will need to use: Write a program that asks the user to input the height and the width of a rectangle, calculates the area and outputs the result. Sequencing Variables Difficulty EASY
8
Challenge 3 Code Screenshot Program Screenshot
9
Challenge 4 Overview You will need to use: Write a program that asks the user to input two numbers, divides the first number by the second number and outputs the result. Sequencing Variables Difficulty EASY
10
Challenge 4 Code Screenshot Program Screenshot
11
Challenge 5 Overview You will need to use: Write a program that asks the user their name and then asks them what their favourite food is, using their name in the question and responds to their answer by saying you like that food as well. Sequencing Variables Difficulty EASY
12
Challenge 5 Code Screenshot Program Screenshot
13
Challenge 6 Overview You will need to use: Write a program that asks the user their name and if it is the same as your name output “You’re cool” otherwise output “I don’t like your name”. Selection Variables Difficulty EASY
14
Challenge 6 Code Screenshot Program Screenshot
15
If it is less than two hours says “That seems reasonable”.
Challenge 7 Overview You will need to use: Write a program that asks the user how long, on average, they spend on a computer per day and: If it is less than two hours says “That seems reasonable”. If it is less than four hours per day says “Do you have time for anything else?” Otherwise the programs says, “You need to get some fresh air once in a while”. Selection Variables Difficulty EASY
16
Challenge 7 Code Screenshot Program Screenshot
17
A teacher needs a program that will convert marks to grades:
Challenge 8 Overview You will need to use: A teacher needs a program that will convert marks to grades: If the mark is more than or equal to 75, convert it to an A. If the mark is more than or equal to 60, convert it to a B. If the mark is more than or equal to 35, convert it to a C. If the mark it less than 35, convert it to a D. Selection Variables Difficulty EASY
18
Challenge 8 Code Screenshot Program Screenshot
19
Challenge 9 Overview You will need to use: Write a program that asks the user to name one of the colours of the Olympic rings (Blue, Black, Red, Yellow and Green), if they correctly name one output “That’s correct” otherwise output “Try again”. Selection Variables Difficulty MEDIUM
20
Challenge 9 Code Screenshot Program Screenshot
21
Challenge 10 Overview You will need to use: Write a program that allows the user to play rock, paper, scissors against the computer. Selection Variables Difficulty HARD
22
Challenge 10 Code Screenshot Program Screenshot
23
Challenge 11 Overview You will need to use: Write a program that asks the user to input a sentence and then tells them how many characters there are in it. String Manipulation Variables Difficulty MEDIUM
24
Challenge 11 Code Screenshot Program Screenshot
25
Challenge 12 Overview You will need to use: Write a program that asks the user to input a sentence and outputs it in upper case. String Manipulation Variables Difficulty MEDIUM
26
Challenge 12 Code Screenshot Program Screenshot
27
Challenge 13 Overview You will need to use: Write a program that asks the user to input a sentence and outputs the number of times ‘the’ occurs in it. String Manipulation Variables Difficulty MEDIUM
28
Challenge 13 Code Screenshot Program Screenshot
29
Challenge 14 Overview You will need to use: Write a program that asks the user to input a sentence and outputs it in lower case. String Manipulation Variables Difficulty MEDIUM
30
Challenge 14 Code Screenshot Program Screenshot
31
Challenge 15 Overview You will need to use: Write a program that asks the user to input a sentence, then asks them to input the word they want to replace and word they would like to replace it with. Finally, output the sentence with the word replaced. String Manipulation Variables Difficulty MEDIUM
32
Challenge 15 Code Screenshot Program Screenshot
33
Write a program that will count from 1 to 10 using a For Loop.
Challenge 16 Overview You will need to use: Write a program that will count from 1 to 10 using a For Loop. Repetition Variables Difficulty EASY
34
Challenge 16 Code Screenshot Program Screenshot
35
Write a program that will output all the odd numbers from 1 to 99.
Challenge 17 Overview You will need to use: Write a program that will output all the odd numbers from 1 to 99. Repetition Variables Difficulty MEDIUM
36
Challenge 17 Code Screenshot Program Screenshot
37
Challenge 18 Overview You will need to use: Write a program that will ask the user to input a number and then outputs the times table for that number. Repetition Variables Difficulty MEDIUM
38
Challenge 18 Code Screenshot Program Screenshot
39
Challenge 19 Overview You will need to use: Write a program that uses a While Loop to make your challenge 13 program start again every time it finishes. Repetition Variables Difficulty MEDIUM
40
Challenge 19 Code Screenshot Program Screenshot
41
Challenge 20 Overview You will need to use: Write a program that asks the user to guess the number and loops until they guess 7. Then say ‘well done’. Repetition Variables Difficulty MEDIUM
42
Challenge 20 Code Screenshot Program Screenshot
43
Challenge 21 Overview You will need to use: Write a program that will allow the user to convert between centimetres and inches and vice versa. Write separate function for: Centimetres to inches Inches to centimetres Functions Selection Variables Difficulty HARD
44
Challenge 21 Code Screenshot Program Screenshot
45
Challenge 22 Overview You will need to use: Write a program that will asks the user for the distance and time that a journey was completed in. Calculate the average speed using a function. Functions Selection Variables Difficulty HARD
46
Challenge 22 Code Screenshot Program Screenshot
47
Challenge 23 Overview You will need to use: A gardener needs to buy some turf for a project they are working on. The garden is rectangular with a circular flower bed in the middle. Ask for the dimensions of the lawn and the radius of the circle. Use a function to calculate the amount of turf needed to turf the garden. Functions Selection Variables Difficulty VERY HARD
48
Challenge 23 Code Screenshot Program Screenshot
49
Challenge 24 Overview You will need to use: Write a function that takes two numbers. The first number indicates the number of spaces that should be displayed and the second number indicates the number of X’s that should be displayed. These should both be displayed on the same line. Now write another function that makes multiple calls to your first function and draws a picture with X’s. Functions Repetition Selection Variables Difficulty VERY HARD
50
Challenge 24 Code Screenshot Program Screenshot
51
Challenge 25 Overview You will need to use: Write a sign up program for an after school club, it should ask the user for the following details and store them in a file: First Name Last Name Gender Tutor Group File Handling Selection Variables Difficulty MEDIUM
52
Challenge 25 Code Screenshot Program Screenshot
53
Challenge 26 Overview You will need to use: Write a maths quiz with three questions. It must ask the user to input their name at the start. At the end it should display a message informing the user of their score. Write a function that saves the user name and quiz result in a text file. File Handling Functions Selection Variables Difficulty HARD
54
Challenge 26 Code Screenshot Program Screenshot
55
Challenge 27 Overview You will need to use: Extend your quiz program by including a list of the scores of people that have taken the quiz before. File Handling Selection Variables Difficulty VERY HARD
56
Challenge 27 Code Screenshot Program Screenshot
57
Challenge 28 Overview You will need to use: Write a random name generator that asks the user to input five names, stores them in a Data Container and outputs one of them randomly. Data Containers Repetition Variables Difficulty HARD
58
Challenge 28 Code Screenshot Program Screenshot
59
Challenge 29 Overview You will need to use: Write a program that allows the user to create a checklist for a holiday and store it. It should start by asking them the destination of the holiday, how many things they need to pack and how many tasks they need to complete to prepare. The user should then be able to enter each item they need to pack and each task they need to complete. It should be stored in a file. Data Containers File Handling Repetition Variables Difficulty VERY HARD
60
Challenge 29 Code Screenshot Program Screenshot
61
Write a function that can be reused to ask each of the questions.
Challenge 30 Overview You will need to use: Improve your maths quiz by storing all the questions and answers in a two dimensional data container. Write a function that can be reused to ask each of the questions. Global Variables Functions Data Containers Repetition Difficulty VERY HARD
62
Challenge 30 Code Screenshot Program Screenshot
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.