📖 Scenario: You are learning about how websites communicate with your browser. Websites use protocols called HTTP and HTTPS to send and receive information.HTTP is like sending a postcard where anyone can read the message. HTTPS is like sending a sealed envelope that keeps your message private and secure.
🎯 Goal: Build a simple comparison chart that shows the key differences between HTTP and HTTPS.This chart will help you remember why HTTPS is safer and when to use each protocol.
📋 What You'll Learn
Create a dictionary called protocols with keys 'HTTP' and 'HTTPS' and their descriptions
Add a variable called secure_protocol set to 'HTTPS'
Use a for loop with variables protocol and description to iterate over protocols.items()
Add a final statement that marks the secure_protocol as recommended
💡 Why This Matters
🌍 Real World
Understanding HTTP and HTTPS helps you recognize safe websites and protect your personal information online.
💼 Career
Knowledge of web protocols is essential for roles in IT support, web development, and cybersecurity.
Progress0 / 4 steps
1
Create the protocols dictionary
Create a dictionary called protocols with these exact entries: 'HTTP': 'Unsecured protocol used for web communication' and 'HTTPS': 'Secured protocol that encrypts data for safe communication'.
Computer Networks
Hint
Use curly braces {} to create a dictionary with two key-value pairs.
2
Add the secure_protocol variable
Add a variable called secure_protocol and set it to the string 'HTTPS'.
Computer Networks
Hint
Assign the string 'HTTPS' to the variable secure_protocol.
3
Loop through the protocols dictionary
Use a for loop with variables protocol and description to iterate over protocols.items(). Inside the loop, write a comment that says # Process protocol and description.
Computer Networks
Hint
Use for protocol, description in protocols.items(): to loop through the dictionary.
4
Mark the secure protocol as recommended
Add a comment after the loop that says # Recommended protocol is HTTPS to mark the secure_protocol as recommended.
Computer Networks
Hint
Add a comment that clearly states the recommended protocol.
Practice
(1/5)
1. What is the main difference between HTTP and HTTPS?
easy
A. HTTPS encrypts data, HTTP does not
B. HTTP encrypts data, HTTPS does not
C. HTTP is faster than HTTPS
D. HTTPS uses a different port than HTTP but no encryption
Solution
Step 1: Understand HTTP basics
HTTP is a protocol used to load websites but it sends data in plain text.
Step 2: Understand HTTPS security
HTTPS adds encryption to protect data from being read by others during transmission.
Final Answer:
HTTPS encrypts data, HTTP does not -> Option A
Quick Check:
Encryption = HTTPS [OK]
Hint: HTTPS means secure by encrypting data [OK]
Common Mistakes:
Thinking HTTP encrypts data
Believing HTTPS is slower without reason
Confusing port difference as main feature
2. Which URL prefix indicates a secure website connection?
easy
A. https://
B. ftp://
C. http://
D. file://
Solution
Step 1: Identify URL prefixes
Common URL prefixes include http:// for normal sites and https:// for secure sites.
Step 2: Match secure prefix
HTTPS means the connection is encrypted and secure.
Final Answer:
https:// -> Option A
Quick Check:
Secure URL = https:// [OK]
Hint: Look for 'https://' to know site is secure [OK]
Common Mistakes:
Choosing http:// as secure
Confusing ftp:// with secure web protocol
Not recognizing https:// as secure
3. What will happen if you try to access a website with https:// but the server only supports http://?
medium
A. The browser will automatically switch to http:// and load the site
B. The browser will show a security warning or error
C. The website will load but without encryption
D. The connection will be blocked by the internet provider
Solution
Step 1: Understand HTTPS requirement
HTTPS requires the server to support encryption with a valid certificate.
Step 2: Browser behavior on unsupported HTTPS
If the server does not support HTTPS, the browser cannot establish a secure connection and will warn the user.
Final Answer:
The browser will show a security warning or error -> Option B
Quick Check:
Unsupported HTTPS = Warning [OK]
Hint: No HTTPS support means browser warns user [OK]
Common Mistakes:
Assuming browser silently switches to HTTP
Thinking site loads without encryption anyway
Believing ISP blocks connection
4. A user reports that their browser shows a "Not Secure" message on a website using https://. What is the most likely cause?
medium
A. The browser does not support HTTPS
B. The website is using HTTP instead of HTTPS
C. The user's internet connection is slow
D. The website's SSL certificate is expired or invalid
Solution
Step 1: Understand HTTPS and SSL certificates
HTTPS requires a valid SSL certificate to prove the site's identity and encrypt data.
Step 2: Identify cause of "Not Secure" message
If the certificate is expired, invalid, or missing, browsers warn users even if URL starts with https://.
Final Answer:
The website's SSL certificate is expired or invalid -> Option D