Complete the code to specify the protocol used in a URL.
url = "[1]://www.example.com"
The http protocol is used for standard web communication without encryption.
Complete the code to specify the secure protocol used in a URL.
secure_url = "[1]://www.secure-site.com"
The https protocol is the secure version of HTTP, encrypting data between browser and server.
Fix the error in the code to check if a URL uses HTTPS.
if url.startswith("[1]"): print("Secure connection")
To check for a secure connection, the URL must start with https://.
Fill both blanks to create a simple flowchart step that checks protocol and prints the result.
if url.startswith("[1]"): print("[2] connection")
The code checks if the URL starts with https:// and prints Secure connection if true.
Fill all three blanks to create a dictionary comprehension that maps URLs to their security status.
status = {url: "[1]" if url.startswith("[2]") else "[3]" for url in urls}This dictionary comprehension labels URLs as Secure if they start with https://, otherwise Insecure.