Last active
July 19, 2016 09:02
-
-
Save richardbwest/b730d6327848eabac5ceae1f1a0ca45f to your computer and use it in GitHub Desktop.
Python Basics Lesson 2 Starter.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,time # We need to import these modules in order to use the sleep and system functions later. | |
os.system('clear') | |
print("Question 1. Which of the following is the correct code?") | |
print("\n\n") | |
print("A. print(hello world) \n") | |
print("B. Print('hello world)") | |
print("C. Print('hello world')") | |
input("\n\nPress enter to see the answer") | |
time.sleep(1) | |
print("...") | |
time.sleep(1) | |
print("...") | |
time.sleep(1) | |
print("...") | |
print("The answer is C!") | |
input("Press enter for the next question") | |
os.system("clear") | |
print("Question 2. Which of the following will correctly display the Post Code 'LA1 5PP'?") | |
print("\n\n") | |
print("A. print('LA' + '1' + '2' + 'PP')") | |
print("B. print('LA' , '1' + '2' , 'PP')") | |
print("C. print('LA' + '1' , '2' + 'PP')") | |
input("\n\nPress enter to see the answer") | |
time.sleep(1) | |
print("...") | |
time.sleep(1) | |
print("...") | |
time.sleep(1) | |
print("...") | |
print("The answer is C!") | |
input("Press enter for the next question") | |
os.system("clear") | |
print("Question 3. Which of the following will correctly ask the user their name and save it as a variable") | |
print("\n\n") | |
print("A. name = input('What's your name')") | |
print("B. name = ('What's your name?')") | |
print("C. input('What's your name?') for name") | |
input("\n\nPress enter to see the answer") | |
time.sleep(1) | |
print("...") | |
time.sleep(1) | |
print("...") | |
time.sleep(1) | |
print("...") | |
print("The answer is A!") | |
time.sleep(3) | |
print("Well done, quiz complete! Goodbye! Click on the link above the code to see how this script was made!") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment