Skip to the content.

Base 64

popcorn/homework hacks

POPCORN HACKS

Hack 1

1. Which image format is best for logos and transparency?

Answer: PNG

2. Which format loses quality to make the file size smaller?

Answer: JPG / JPEG

3. Which format is used for simple animations, like memes?

Answer: GIF

Hack 2

What does this Base64 string decode to? U1Q=

Answer:

U = 20 → 010100

1 = 53 → 110101

Q = 16 → 010000

Together = 010100 110101 010000 = ASCII for “ST”


HOMEWORK HACKS

Hack 1

from IPython.display import display, HTML

html_code = """
<div style="font-family: Arial, sans-serif; max-width: 400px; margin: auto;">
  <div style="height: 60px; background-color: #FF6B6B; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">
    #FF6B6B
  </div>
  <div style="height: 60px; background-color: #FFD93D; display: flex; align-items: center; justify-content: center; color: black; font-weight: bold;">
    #FFD93D
  </div>
  <div style="height: 60px; background-color: #6BCB77; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">
    #6BCB77
  </div>
  <div style="height: 60px; background-color: #4D96FF; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">
    #4D96FF
  </div>
  <div style="height: 60px; background-color: #843B62; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">
    #843B62
  </div>
</div>
"""

display(HTML(html_code))
#FF6B6B
#FFD93D
#6BCB77
#4D96FF
#843B62

Hack 2

lillies!