Programming basics · GCSE · OCR J277 2.2.1, AQA 8525 3.2.7, Edexcel 1CP2 6.4.1 · about 10 min
Print text and numbers, several things at once.
[1 mark]What does this program print?
print("one", "two", "three")[1 mark]What does this program print?
print("a" "b")[1 mark]What does this program print?
print("above")
print()
print("below")[1 mark]What is the difference between 42 and "42"?
[1 mark]You want to print: BugBot's LED is green. Which line works?
print("BugBot's LED is green")print('BugBot's LED is green')print(BugBot's LED is green)print("BugBot's LED is green)[1 mark]What does this program print?
print("the answer is", 6 * 7)Print exactly three lines:
- Hello from BugBot
- 1 2 3 (three numbers, one print, commas between them)
- BugBot BugBot BugBot (the word three times from one print)
# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()
print("Hello from BugBot")Plan your program here, then type it in and press Run.
+, - and | characters around the word BugBot, four lines tall.print("a", "b", sep="-") does.