Download presentation
Presentation is loading. Please wait.
1
GCSE Computing
2
Game Over 2.0 - developments
print(“same ”, “message “) print(“Just “, “a bit”, “bigger”) #computer only reads one line. print( “”” a number of lines, ASCII Art print(“Here”, end=“ “) not onto a new line \t = tab \\ = \ \’ = ‘ \”=“ \a = system bell \n = new line
3
Concatenate + formulae
print(“concatenate two ” + “strings with ‘+’ operator”) print(“Pie” * 10) print( ) print(“\nIf a restaurant bill comes to £19 with tip between 4, the cost is?”) input(“\nPress a key to find out.”) print(“\n19 / 4 =“, 19/4) +, -, *, / //(integer), % (modulus/remainder)
4
Python – 1st Tutorial “Game Over”
Apply skills Write a program in script mode displays the following: Sprint Training Run 1 (sec) = Run2 (sec) = 10.13 Run 3(sec) = 9.98 Press Enter to view average time Average time (sec) =, answer Make sure that you add a line of code to delay the program until the user presses a key. You must enter code to display the average (All times divided by 3)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.