Base 64, Images, Color Coding
Popcorn Hack Base 64
One downside of Base64 is that it makes the data bigger. This extra size can slow down storage and network transfers, especially when dealing with large files.
Practice MC
B, Base64 encoding increases the size of Data
Popcorn Hack Digital Imaging
PNG format because it supports transparent backgrounds and keeps images sharp without losing quality on any screen.
Practice MC
B, PNG because it supports transparency without losing image quality
Homework Hack
1) What is a hex color code? A hex color code is a way to show colors on a screen using six numbers or letters. Based on the rgb system, where the first two characters are for red, next two are green, and last two blue. One example is the color Cherry Blossom Pink, for which the hex code is: #FBB7C0. I used this color in my CPT project for book journals for the background of each book card.
2) What is Base64? Base64 is a way to turn an image into a long text string so it can be sent or stored easily in web pages. It’s mostly used for small images because it makes the file bigger. We used Base64 in our project last trimester to display book icons for the aesthetic of our site.
3) Why might you use Base64 instead of a regular image file? It’s better to use Base64 instead of a regular image file to keep everything in one place, like inside my HTML or CSS, so that I don’t need extra image files. This can make small images load faster and avoid broken or faulty links that won’t display an image. I could use Base64 to replace one of the cover url links in my friend’s book freature because it’s broken and doesn’t properly show the cover image.
The image is stored as a file, duck.png, in the images folder of my site. The pixels are stored in the file and when displayed, they’re shown in correct order. The code tells the browser to locate this file on the server and display it on the webpage. The alt attribute provides a description of the image in case it can’t be displayed.
def secure_entry_system(keycard, pin, fingerprint):
def AND(a, b, c):
return a & b & c
return AND(keycard, pin, fingerprint)
# Test cases
print(secure_entry_system(1, 1, 1))
print(secure_entry_system(0, 1, 1))
print(secure_entry_system(1, 0, 1))
print(secure_entry_system(1, 1, 0))
1
0
0
0