Networks · GCSE · OCR J277 1.3.2, AQA 8525 3.5, Edexcel 1CP2 4.1.6 · about 15 min
Standards, and TCP, UDP, IP, HTTP, HTTPS, FTP, SMTP, POP and IMAP.
[1 mark]Which protocol sends email to a mail server?
[1 mark]Why is HTTPS used for logins and payments?
[1 mark]How is IMAP different from POP?
[1 mark]Why are standards needed?
[1 mark]Which protocol is used to transfer files between computers?
[1 mark]What does this program print?
reply = "404 Not Found"
code, rest = reply.split(" ", 1)
print(int(code) == 200, rest)Write request(path), which sends GET <path>, waits up to a second for the reply, and returns the status code as a number and the rest of the reply as text. Request /battery, /camera and /lights. For a status of 200, print <name>: <rest> (for example battery: 87, without the OK); otherwise print <name>: error <status>. Turn the LED green if the battery is above 50, and red if not.
# the two lines every program starts with: the commands, then the robot from bugbot import * connect()
Plan your program here, then type it in and press Run.
<name>: no reply.