Download presentation
Presentation is loading. Please wait.
1
GCSE Computing
2
Python Code What will happen? Any errors in code?
Text (e.g. Game Over) Result Syntax Error (e.g. Error in code)
3
Python – Print function What will display?
print(“Hello World”)
4
Python – Print function What will display?
Hello World
5
Python – Print function What will display?
Print(“Game Over”)
6
Python – Print function What will display?
Print(“Game Over”) Syntax Error
7
Python – Print function What will display?
print(“Cost =“, 10+25)
8
Python – Print function What will display?
Cost = 35
9
Python – Print function What will display?
10
Python – Print function What will display?
185
11
Python – Print function What will display?
12
Python – Print function What will display?
***************
13
Python – Print function What will display?
print(“\nHello \nWorld“)
14
Python Code What will display?
Hello World
15
Variables and input name = input(“Hi. What’s your name? “) #user enters George print(“Hi ”, name) input(“\n\nPress enter to continue”)
16
Hi. What’s your name? George Hi George Press enter to continue
Variables and input Hi. What’s your name? George Hi George Press enter to continue
17
Variables and input quote = “I think there is a world market for maybe five computers. IBM Chief 1943” print(quote.upper())
18
Variables and input I THINK THERE IS A WORLD MARKET FOR MAYBE FIVE COMPUTERS. IBM CHIEF 1943
19
Variables and input car = int(input(“Car cost: “)) #user enters 5000 house = int(input(“House Cost: “)) #user enters total = car + house print(“/n Grand total: “, total)
20
Car Cost:5000 House Cost:100000 Grand total: 105000
Variables and input Car Cost:5000 House Cost: Grand total:
21
While loop n = 0 while n < 65: print (n) n += 5
22
While Loop ….. etc. 60
23
For loop for i in range (0,5): print(i, “Looping”)
24
0 Looping 1 Looping 2 Looping 3 Looping 4 Looping
For loop 0 Looping 1 Looping 2 Looping 3 Looping 4 Looping
25
IF statement password = input(“Enter your password”) #user enters bish1 if password == “bish”: print(“Access granted”) else: print(“Access denied”) input(“\n\nPress enter to continue”)
26
Enter your password bish1 Access denied Press enter to continue
IF statement Enter your password bish1 Access denied Press enter to continue
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.