# data[].attributes.body
https://canva.link/86fwyvojzlqpnni

# data[].attributes.body
CANVA

https://canva.link/wi0k9kixee5a506

# data[].attributes.attachment_link.readable_text
from tkinter import*
import sqlite3

root = Tk()
root.title('Medication Reminder App')
root.geometry('450x400')

con= sqlite3.connect ('med_reminder.db')
cur= con.cursor()
'''cur.execute("""CREATE TABLE meds(first_name text,last_name text, nric integer, program text)""")'''
def submit():
    con = sqlite3.connect('med_reminder.db')

    cur = con.cursor()

    cur.execute("INSERT INTO meds VALUES(:f_name, :l_name, :nric, :program)",
                {'f_name':f_name.get(),
                 'l_name':l_name.get(),
                 'nric':nric.get(),
                 'program':program.get(),
                 }
         )
    con.commit()
    con.close()
    f_name.delete(0,END)
    l_name.delete(0,END)
    nric.delete(0,END)
    program.delete(0,END)

def show():
    con = sqlite3.connect('med_reminder.db')
    cur = con.cursor()
    cur.execute("SELECT *, oid FROM meds")
    recs = cur.fetchall()

    print_recs = ''
    for rec in recs:
        print_recs += str(rec)+"\n"

    alldata_label = Label(root,text = print_recs, font= ["Monospace",10,'bold'])
    alldata_label.grid(row = 6,column = 0,columnspan = 2)

    con.commit()
    con.close()

def delete():
    con= sqlite3.connect('med_reminder.db')
    cur= con.cursor()
    cur.execute("DELETE from meds WHERE oid= " + delete_e.get())
    delete_e.delete(0,END)
    con.commit()
    con.close()

def edit():
    global edit
    global f_name_edit
    global l_name_edit
    global nric_edit
    global program_edit
    edit = Tk()
    edit.title("Edit Medication Records")
    edit.geometry('420x150')
    con=sqlite3.connect('med_reminder.db')
    cur=con.cursor()
    record_id =delete_e.get()
    cur.execute("SELECT * FROM meds WHERE oid = " + record_id)
    recs =cur.fetchall()

    f_label_edit=Label(edit,text = 'Date:')
    f_label_edit.grid(row=0,column=0,padx=10,pady=(10,0))

    l_label_edit=Label(edit,text = 'Time:')
    l_label_edit.grid(row=1,column=0,padx=10)

    nric_label_edit=Label(edit,text = 'Pill: ')
    nric_label_edit.grid(row=2,column=0,padx=10)

    program_label_edit=Label(edit,text = 'Hours until next dose: ')
    program_label_edit.grid(row=3,column=0,padx=10)

    f_name_edit = Entry(edit,width = 40)
    f_name_edit.grid(row = 0,column = 1,padx =10, pady = (10,0))

    l_name_edit = Entry(edit,width = 40)
    l_name_edit.grid(row = 1,column = 1,padx =10)

    nric_edit= Entry(edit,width = 40)
    nric_edit.grid(row = 2,column = 1,padx =10)

    program_edit = Entry(edit,width = 40)
    program_edit.grid(row = 3,column = 1,padx =10)

    for rec in recs:
        f_name_edit.insert(0,rec[0])
        l_name_edit.insert(0,rec[1])
        nric_edit.insert(0,rec[2])
        program_edit.insert(0,rec[3])

    save_btn =Button(edit,text = 'Save Records',command = update)
    save_btn.grid(row=7,columnspan=2,padx=10,ipadx=116)

def update():
    con=sqlite3.connect('med_reminder.db')
    cur=con.cursor()
    record_id=delete_e.get()
    cur.execute("UPDATE meds SET first_name=:first,last_name=:last,nric=:nric,program=:program WHERE oid = :oid""",{'oid': record_id,'first': f_name_edit.get(),'last': l_name_edit.get(),'nric': nric_edit.get(),'program': program_edit.get()})
    con.commit()
    con.close()
    edit.destroy()

f_label = Label(root,text= 'Date: ')
f_label.grid(row = 0,column = 0,padx =10, pady = (10,0) )

l_label = Label(root,text = 'Time: ')
l_label.grid(row = 1,column = 0,padx =10)

nric_label = Label(root,text = 'Pill: ')
nric_label.grid(row = 2,column = 0,padx =10)

program_label = Label(root,text = 'Hours until next dose: ')
program_label.grid(row = 3,column = 0,padx =10)

delete_label= Label(root,text = 'Delete/Edit ID no: ')
delete_label.grid(row=7, column=0,padx=10,pady=(10,0))

f_name = Entry(root,width = 40)
f_name.grid(row = 0,column = 1,padx =10, pady = (10,0))

l_name = Entry(root,width = 40)
l_name.grid(row = 1,column = 1,padx =10)

nric= Entry(root,width = 40)
nric.grid(row = 2,column = 1,padx =10)

program = Entry(root,width = 40)
program.grid(row = 3,column = 1,padx =10)

delete_e =Entry(root,width=40)
delete_e.grid(row=7,column=1,padx=10,pady=5)


submit_btn = Button(root,text = "Record",command = submit)
submit_btn.grid(row = 4,columnspan = 2,pady=10,padx=10,ipadx=100)

show_btn = Button(root,text = "Show Records",command = show)
show_btn.grid(row = 5,columnspan = 2,pady=10,padx=10,ipadx=108)

delete_btn=Button(root,text="Delete Records",command = delete)
delete_btn.grid(row=8,columnspan=2,padx=10,pady=10,ipadx=108)

edit_btn=Button(root,text="Edit Records",command = edit)
edit_btn.grid(row=9,columnspan=2,padx=10,pady=10,ipadx=118)

con.commit()
con.close()
root.mainloop()

# data[].attributes.body
CANVA

https://canva.link/wi0k9kixee5a506

# data[].attributes.attachment_link.description
Get access to files anywhere through secure cloud storage and file backup for your photos, videos, files and more with Google Drive.

# data[].attributes.body
canva link:https://canva.link/05bib6aoxufkgg8

# data[].attributes.attachment_link.readable_text
import pygame
import sys
import random

# Initialize Pygame
pygame.init()
pygame.font.init()

# Game Constants
WIDTH, HEIGHT = 800, 600
FPS = 60

# Colors
BG_COLOR = (24, 24, 32)
PANEL_COLOR = (36, 37, 49)
TEXT_COLOR = (240, 240, 245)
ACCENT_COLOR = (90, 104, 240)

# Choice Colors
COLOR_KNIGHT = (52, 152, 219)   # Blue
COLOR_DRAGON = (231, 76, 60)    # Red
COLOR_WIZARD = (155, 89, 182)   # Purple
COLOR_UNKNOWN = (149, 165, 166)  # Gray

# Setup Screen
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Knight, Dragon, Wizard")
clock = pygame.time.Clock()

# Fonts
font_title = pygame.font.SysFont("arial", 40, bold=True)
font_large = pygame.font.SysFont("arial", 28, bold=True)
font_medium = pygame.font.SysFont("arial", 22)
font_small = pygame.font.SysFont("arial", 16)

# Rules mapping
RULES = {
    "Knight": "Wizard",   # Knight beats Wizard
    "Dragon": "Knight",   # Dragon beats Knight
    "Wizard": "Dragon"    # Wizard beats Dragon
}

# Drawing vector icons dynamically
def draw_icon(surface, name, center, radius):
    cx, cy = center
    if name == "Knight":
        # Draw a Shield and Sword
        pygame.draw.circle(surface, COLOR_KNIGHT, center, radius)
        # Shield shape (triangle + rect mix simplified)
        points = [(cx-20, cy-20), (cx+20, cy-20), (cx+20, cy), (cx, cy+25), (cx-20, cy)]
        pygame.draw.polygon(surface, (220, 220, 230), points)
        pygame.draw.line(surface, (180, 180, 190), (cx, cy-20), (cx, cy+25), 3)
    elif name == "Dragon":
        # Draw a Dragon Flame
        pygame.draw.circle(surface, COLOR_DRAGON, center, radius)
        # Flame layers
        points1 = [(cx, cy-30), (cx+20, cy+10), (cx+10, cy+25), (cx-10, cy+25), (cx-20, cy+10)]
        points2 = [(cx, cy-15), (cx+12, cy+10), (cx+5, cy+20), (cx-5, cy+20), (cx-12, cy+10)]
        pygame.draw.polygon(surface, (255, 120, 0), points1)
        pygame.draw.polygon(surface, (255, 210, 0), points2)
    elif name == "Wizard":
        # Draw a Wizard Hat
        pygame.draw.circle(surface, COLOR_WIZARD, center, radius)
        # Hat triangle
        points = [(cx, cy-30), (cx-25, cy+15), (cx+25, cy+15)]
        pygame.draw.polygon(surface, (60, 30, 120), points)
        # Brim
        pygame.draw.ellipse(surface, (80, 40, 160), (cx-35, cy+10, 70, 12))
        # Star details
        pygame.draw.circle(surface, (255, 255, 150), (cx, cy-5), 4)
    else:
        # Mystery icon for AI choice before reveal
        pygame.draw.circle(surface, COLOR_UNKNOWN, center, radius)
        text = font_large.render("?", True, (50, 50, 50))
        surface.blit(text, text.get_rect(center=center))

class Button:
    def __init__(self, x, y, w, h, text, choice_name, color):
        self.rect = pygame.Rect(x, y, w, h)
        self.text = text
        self.choice_name = choice_name
        self.color = color
        self.is_hovered = False

    def handle_event(self, event):
        if event.type == pygame.MOUSEMOTION:
            self.is_hovered = self.rect.collidepoint(event.pos)
        if event.type == pygame.MOUSEBUTTONDOWN:
            if event.button == 1 and self.is_hovered:
                return self.choice_name
        return None

    def draw(self, surface):
        # Draw button background
        draw_color = [min(255, c + 30) for c in self.color] if self.is_hovered else self.color
        pygame.draw.rect(surface, draw_color, self.rect, border_radius=10)
        
        # Render text
        txt_surf = font_medium.render(self.text, True, TEXT_COLOR)
        surface.blit(txt_surf, txt_surf.get_rect(center=self.rect.center))

def determine_winner(player, ai):
    if player == ai:
        return "Tie Game!"
    elif RULES[player] == ai:
        return "You Win!"
    else:
        return f"{ai} wins this round! (AI)"

def main():
    # Game State Variables
    player_score = 0
    ai_score = 0
    player_choice = None
    ai_choice = None
    result_text = "Choose your champion to begin!"

    # Create UI Buttons
    btn_w, btn_h = 160, 50
    spacing = 40
    start_x = (WIDTH - (3 * btn_w + 2 * spacing)) // 2
    y_pos = 480

    buttons = [
        Button(start_x, y_pos, btn_w, btn_h, "Knight", "Knight", COLOR_KNIGHT),
        Button(start_x + btn_w + spacing, y_pos, btn_w, btn_h, "Dragon", "Dragon", COLOR_DRAGON),
        Button(start_x + 2 * (btn_w + spacing), y_pos, btn_w, btn_h, "Wizard", "Wizard", COLOR_WIZARD)
    ]

    # Reset Button
    reset_btn = Button(WIDTH // 2 - 60, HEIGHT - 50, 120, 35, "Reset Scores", "Reset", PANEL_COLOR)

    # Game Loop
    running = True
    while running:
        screen.fill(BG_COLOR)

        # Event Handling
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                running = False
            
            # Check interaction for selection buttons
            for btn in buttons:
                action = btn.handle_event(event)
                if action:
                    player_choice = action
                    ai_choice = random.choice(["Knight", "Dragon", "Wizard"])
                    result_text = determine_winner(player_choice, ai_choice)
                    
                    if "You Win" in result_text:
                        player_score += 1
                    elif "AI" in result_text:
                        ai_score += 1

            # Check interaction for reset button
            reset_action = reset_btn.handle_event(event)
            if reset_action:
                player_score = 0
                ai_score = 0
                player_choice = None
                ai_choice = None
                result_text = "Scores cleared! Choose your champion."

        # --- Draw UI Elements ---
        
        # Header / Title Block
        title_surf = font_title.render("Knight ��� Dragon ��� Wizard", True, TEXT_COLOR)
        screen.blit(title_surf, title_surf.get_rect(centerx=WIDTH // 2, top=30))
        
        # Rules Subtitle Header
        rules_surf = font_small.render("Rules: Knight beats Wizard | Wizard beats Dragon | Dragon beats Knight", True, (160, 160, 170))
        screen.blit(rules_surf, rules_surf.get_rect(centerx=WIDTH // 2, top=85))

        # Score Arena Panel
        arena_rect = pygame.Rect(50, 130, WIDTH - 100, 220)
        pygame.draw.rect(screen, PANEL_COLOR, arena_rect, border_radius=15)

        # Player Display Zone
        p_text = font_large.render(f"Player: {player_score}", True, TEXT_COLOR)
        screen.blit(p_text, (120, 150))
        draw_icon(screen, player_choice, (170, 240), 50)
        if player_choice:
            lbl = font_medium.render(player_choice, True, TEXT_COLOR)
            screen.blit(lbl, lbl.get_rect(centerx=170, top=300))

        # VS text middle
        vs_text = font_title.render("VS", True, ACCENT_COLOR)
        screen.blit(vs_text, vs_text.get_rect(center=(WIDTH // 2, 240)))

        # AI Display Zone
        ai_text = font_large.render(f"AI: {ai_score}", True, TEXT_COLOR)
        screen.blit(ai_text, (WIDTH - 240, 150))
        draw_icon(screen, ai_choice, (WIDTH - 170, 240), 50)
        if ai_choice:
            lbl = font_medium.render(ai_choice, True, TEXT_COLOR)
            screen.blit(lbl, lbl.get_rect(centerx=WIDTH - 170, top=300))

        # Dynamic Game Feedback Message Banner
        res_surf = font_large.render(result_text, True, ACCENT_COLOR if "Win" in result_text else TEXT_COLOR)
        screen.blit(res_surf, res_surf.get_rect(centerx=WIDTH // 2, top=390))

        # Render Game Action Choice Buttons
        for btn in buttons:
            btn.draw(screen)

        reset_btn.draw(screen)

        # Update Frame display
        pygame.display.flip()
        clock.tick(FPS)

    pygame.quit()
    sys.exit()

if __name__ == "__main__":
    main()

# data[].attributes.body
https://canva.link/7nt7roofcemv9o7

# data[].attributes.attachment_link.readable_text
"""
Health Quiz + Stress Management Assistant
-------------------------------------------
Part 1: A 4-question multiple-choice lifestyle/health quiz.
Part 2: A short "Health Trivia" mini-game (a fun break from work,
        with correct/incorrect feedback and a final score).
Part 3: A stress management assistant that lets the user pick their
        mood from 5 options and rate their day.
"""

import datetime


# ----------------------------------------------------------------
# SHARED HELPER
# ----------------------------------------------------------------
def ask_question(question, choices):
    """Ask a single multiple-choice question and return the chosen letter."""
    print("\n" + question)
    for letter, choice in choices.items():
        print(f"  {letter}) {choice}")
    valid_options = [c.lower() for c in choices.keys()]
    while True:
        answer = input("Your answer: ").strip().lower()
        if answer in valid_options:
            return answer
        print(f"Please choose one of: {', '.join(choices.keys())}")


# ----------------------------------------------------------------
# PART 1: HEALTH QUIZ
# ----------------------------------------------------------------
def run_health_quiz():
    print("=" * 50)
    print(" HEALTH QUIZ")
    print("=" * 50)

    questions = [
        {
            "question": "1. How many hours of sleep do you usually get per night?",
            "choices": {
                "a": "Less than 5 hours",
                "b": "5-6 hours",
                "c": "7-8 hours",
                "d": "More than 8 hours",
            },
        },
        {
            "question": "2. How many days per week do you exercise (30+ minutes)?",
            "choices": {
                "a": "0 days",
                "b": "1-2 days",
                "c": "3-4 days",
                "d": "5 or more days",
            },
        },
        {
            "question": "3. How would you describe your typical diet?",
            "choices": {
                "a": "Mostly fast food / processed food",
                "b": "A mix of healthy and unhealthy meals",
                "c": "Mostly home-cooked, balanced meals",
                "d": "Strict, well-planned nutrition",
            },
        },
        {
            "question": "4. How many glasses of water do you drink per day?",
            "choices": {
                "a": "Less than 2 glasses",
                "b": "3-4 glasses",
                "c": "5-7 glasses",
                "d": "8 or more glasses",
            },
        },
    ]

    answers = {}
    for q in questions:
        ans = ask_question(q["question"], q["choices"])
        answers[q["question"]] = q["choices"][ans]

    print("\n" + "-" * 50)
    print("Quiz Summary:")
    for question, chosen in answers.items():
        print(f"- {question}\n  -> {chosen}")

    return answers


# ----------------------------------------------------------------
# PART 2: HEALTH TRIVIA MINI-GAME
# ----------------------------------------------------------------
def ask_trivia_question(question, choices, correct_letter):
    """Ask a trivia question, reveal if the answer was correct, return True/False."""
    print("\n" + question)
    for letter, choice in choices.items():
        print(f"  {letter}) {choice}")
    valid_options = [c.lower() for c in choices.keys()]
    while True:
        answer = input("Your answer: ").strip().lower()
        if answer in valid_options:
            break
        print(f"Please choose one of: {', '.join(choices.keys())}")

    if answer == correct_letter:
        print("Correct! ����")
        return True
    else:
        print(f"Not quite. The correct answer was '{correct_letter}) "
              f"{choices[correct_letter]}'.")
        return False


def run_health_trivia():
    print("\n" + "=" * 50)
    print(" HEALTH TRIVIA - QUICK BRAIN BREAK!")
    print("=" * 50)
    print("Take a short breather with this quick health trivia game.\n")

    trivia_questions = [
        {
            "question": "1. How many hours of sleep are generally recommended "
                        "for adults each night?",
            "choices": {
                "a": "3-4 hours",
                "b": "5-6 hours",
                "c": "7-9 hours",
                "d": "10-12 hours",
            },
            "correct": "c",
        },
        {
            "question": "2. Which nutrient is the body's main source of quick energy?",
            "choices": {
                "a": "Carbohydrates",
                "b": "Vitamins",
                "c": "Minerals",
                "d": "Fiber",
            },
            "correct": "a",
        },
        {
            "question": "3. About how many glasses of water are commonly "
                        "recommended per day?",
            "choices": {
                "a": "1-2 glasses",
                "b": "3-4 glasses",
                "c": "8 glasses",
                "d": "15 glasses",
            },
            "correct": "c",
        },
        {
            "question": "4. Which of these is a good way to relieve stress?",
            "choices": {
                "a": "Deep breathing exercises",
                "b": "Skipping meals",
                "c": "Staying up all night",
                "d": "Ignoring how you feel",
            },
            "correct": "a",
        },
        {
            "question": "5. How many minutes of moderate exercise per week "
                        "are commonly recommended for adults?",
            "choices": {
                "a": "10 minutes",
                "b": "30 minutes",
                "c": "150 minutes",
                "d": "500 minutes",
            },
            "correct": "c",
        },
    ]

    score = 0
    for q in trivia_questions:
        if ask_trivia_question(q["question"], q["choices"], q["correct"]):
            score += 1

    total = len(trivia_questions)
    print("\n" + "-" * 50)
    print(f"Trivia complete! You scored {score}/{total}.")
    if score == total:
        print("Perfect score! You're a health expert. ����")
    elif score >= total * 0.6:
        print("Nice work! You know your health basics well.")
    else:
        print("Good effort! Every round is a chance to learn something new.")

    return score


# ----------------------------------------------------------------
# PART 3: STRESS MANAGEMENT ASSISTANT
# ----------------------------------------------------------------
def run_stress_assistant():
    print("\n" + "=" * 50)
    print(" STRESS MANAGEMENT ASSISTANT")
    print("=" * 50)

    today = datetime.date.today().strftime("%A, %B %d, %Y")
    print(f"\nToday is {today}. Let's check in on how you're doing.\n")

    # Question 1: Mood selection (5 options)
    mood_options = {
        "a": "Happy",
        "b": "Excited",
        "c": "Okay",
        "d": "Stressed",
        "e": "Sad / Angry",
    }
    ans = ask_question("1. Which best describes how you're feeling today?", mood_options)
    feeling = mood_options[ans]

    # Question 2: Rate the day
    while True:
        rating_input = input(
            "\n2. On a scale of 1-10, how would you rate your day overall? "
        ).strip()
        if rating_input.isdigit() and 1 <= int(rating_input) <= 10:
            rating = int(rating_input)
            break
        print("Please enter a whole number between 1 and 10.")

    # Supportive feedback based on selected mood
    mood_messages = {
        "Happy": "That's wonderful to hear! Try to hold onto what made today good.",
        "Excited": "Great energy! Channel it into something productive or fun.",
        "Okay": "An 'okay' day is still a day you got through. That counts for something.",
        "Stressed": "That sounds heavy. A few minutes of deep breathing or a short "
                    "walk can help take the edge off.",
        "Sad / Angry": "It's okay to feel this way. Consider talking to someone you "
                       "trust, or taking a quiet moment just for yourself.",
    }
    message = mood_messages.get(feeling, "Thanks for checking in with yourself today.")

    print("\n" + "-" * 50)
    print("Check-in Summary:")
    print(f"- Mood: {feeling}")
    print(f"- Day rating: {rating}/10")
    print(f"\n{message}")

    return {"feeling": feeling, "rating": rating}


# ----------------------------------------------------------------
# MAIN PROGRAM
# ----------------------------------------------------------------
def main():
    quiz_answers = run_health_quiz()
    trivia_score = run_health_trivia()
    checkin = run_stress_assistant()

    print("\n" + "=" * 50)
    print("Thanks for completing the health quiz, trivia game, and check-in!")
    print("=" * 50)


if __name__ == "__main__":
    main()

# data[].attributes.body
https://canva.link/dfoyuneya8bbht7

# data[].attributes.attachment_link.readable_text
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
from tkinter import messagebox


app = ttk.Window(themename="cosmo")

app.title("Calories Calculator")

app.geometry("500x750")


# Center Window

window_width = 500
window_height = 750

screen_width = app.winfo_screenwidth()
screen_height = app.winfo_screenheight()


x = int((screen_width / 2) - (window_width / 2))
y = int((screen_height / 2) - (window_height / 2))


app.geometry(
    f"{window_width}x{window_height}+{x}+{y}"
)


# ---------------- Welcome Screen ----------------

welcome_frame = ttk.Frame(app)
welcome_frame.pack(fill="both", expand=True)


def open_calculator():
    welcome_frame.pack_forget()
    calculator_frame.pack(fill="both", expand=True)


welcome_title = ttk.Label(
    welcome_frame,
    text="Welcome to\nCalories Calculator",
    font=("Arial", 25, "bold"),
    bootstyle="success"
)

welcome_title.pack(pady=60)


welcome_text = ttk.Label(
    welcome_frame,
    text="""
Calculate your daily calorie needs

Features:
��� BMI Calculation
��� BMR Calculation
��� Daily Calories
""",
    font=("Arial", 13)
)

welcome_text.pack(pady=20)


start_button = ttk.Button(
    welcome_frame,
    text="Start",
    bootstyle="primary",
    command=open_calculator
)

start_button.pack(pady=30)


# ---------------- About Function ----------------

def show_about():

    messagebox.showinfo(
        "About",
        """Calories Calculator

Version 2.0

Developed using Python
with ttkbootstrap.

Features:
��� BMI Calculator
��� BMR Calculator
��� Daily Calories Calculator
��� Health Advice System
��� User Friendly Interface
"""
    )


# ---------------- Menu ----------------

menu_bar = ttk.Menu(app)

# File Menu
file_menu = ttk.Menu(menu_bar, tearoff=0)

file_menu.add_command(
    label="Reset",
    command=lambda: reset()
)

file_menu.add_separator()

file_menu.add_command(
    label="Exit",
    command=lambda: exit_app()
)

menu_bar.add_cascade(
    label="File",
    menu=file_menu
)

# Help Menu
help_menu = ttk.Menu(menu_bar, tearoff=0)

help_menu.add_command(
    label="About",
    command=show_about
)

menu_bar.add_cascade(
    label="Help",
    menu=help_menu
)

app.config(menu=menu_bar)


# ---------------- Calculator Screen ----------------


calculator_frame = ttk.Frame(app)

calculator_frame.pack(
    fill="both",
    expand=True
)

calculator_frame.pack_forget()


title = ttk.Label(
    calculator_frame,
    text="Calories Calculator",
    font=("Arial", 25, "bold"),
    bootstyle="success"
)

title.pack(pady=20)



# Name
ttk.Label(calculator_frame, text="Name").pack()

name_entry = ttk.Entry(calculator_frame, width=30)
name_entry.pack(pady=5)



# Age
ttk.Label(calculator_frame, text="Age").pack()

age_entry = ttk.Entry(calculator_frame, width=30)
age_entry.pack(pady=5)



# Weight
ttk.Label(calculator_frame, text="Weight (kg)").pack()

weight_entry = ttk.Entry(calculator_frame, width=30)
weight_entry.pack(pady=5)



# Height
ttk.Label(calculator_frame, text="Height (cm)").pack()

height_entry = ttk.Entry(calculator_frame, width=30)
height_entry.pack(pady=5)



# Gender
ttk.Label(calculator_frame, text="Gender").pack()

gender_box = ttk.Combobox(
    calculator_frame,
    values=["Male", "Female"],
    width=27
)

gender_box.pack(pady=5)
gender_box.set("Male")



# Activity
ttk.Label(calculator_frame, text="Activity Level").pack()

activity_box = ttk.Combobox(
    calculator_frame,
    values=[
        "Low",
        "Light",
        "Moderate",
        "High"
    ],
    width=27
)

activity_box.pack(pady=5)
activity_box.set("Moderate")



# ---------------- Result Card ----------------

result_frame = ttk.Frame(
    calculator_frame,
    bootstyle="light"
)

result_frame.pack(
    pady=20,
    padx=20,
    fill="x"
)


result_title = ttk.Label(
    result_frame,
    text="Calculation Result",
    font=("Arial", 16, "bold"),
    bootstyle="success"
)

result_title.pack(pady=10)


result_label = ttk.Label(
    result_frame,
    text="Result will appear here",
    font=("Arial", 13)
)

result_label.pack(
    pady=10
)



# Calculate Function

def calculate():

    try:

        name = name_entry.get()

        if name == "":
            messagebox.showwarning(
                "Warning",
                "Please enter your name!"
            )
            return


        age = int(age_entry.get())
        weight = float(weight_entry.get())
        height = float(height_entry.get())


        if age <= 0 or weight <= 0 or height <= 0:
            messagebox.showwarning(
                "Warning",
                "Please enter valid information!"
            )
            return


        gender = gender_box.get()
        activity = activity_box.get()


        # BMI

        height_m = height / 100

        bmi = weight / (height_m * height_m)


        if bmi < 18.5:

            category = "Underweight"

        elif bmi < 25:

            category = "Normal"

        elif bmi < 30:

            category = "Overweight"

        else:

            category = "Obese"



        # Health Advice

        if category == "Underweight":

            advice = "Try to eat balanced meals and get enough nutrients."


        elif category == "Normal":

            advice = "Maintain your current healthy lifestyle."


        elif category == "Overweight":

            advice = "Pay attention to diet and exercise regularly."


        else:

            advice = "Improve your lifestyle and maintain healthy habits."



        # BMR

        if gender == "Male":

            bmr = (
                10 * weight
                + 6.25 * height
                - 5 * age
                + 5
            )

        else:

            bmr = (
                10 * weight
                + 6.25 * height
                - 5 * age
                - 161
            )



        # Activity Factor

        factors = {

            "Low": 1.2,

            "Light": 1.375,

            "Moderate": 1.55,

            "High": 1.725

        }



        calories = bmr * factors[activity]



        result_label.config(

    text=f"""
====================

        RESULT

====================

Name:
{name}


BMI:
{bmi:.2f}


Category:
{category}


Health Advice:
{advice}


BMR:
{bmr:.0f} kcal


Daily Calories:
{calories:.0f} kcal

====================
"""

)



    except ValueError:


        messagebox.showerror(

            "Error",

            "Please enter numbers only!"

        )



# Reset Function

def reset():

    name_entry.delete(0, END)
    age_entry.delete(0, END)
    weight_entry.delete(0, END)
    height_entry.delete(0, END)

    gender_box.set("Male")
    activity_box.set("Moderate")

    result_label.config(
        text="Result will appear here"
    )



# Exit Function

def exit_app():

    app.destroy()



# Buttons

button_frame = ttk.Frame(calculator_frame)

button_frame.pack(pady=10)


ttk.Button(
    button_frame,
    text="Calculate",
    bootstyle="success",
    command=calculate
).grid(row=0, column=0, padx=5)


ttk.Button(
    button_frame,
    text="Reset",
    bootstyle="warning",
    command=reset
).grid(row=0, column=1, padx=5)


ttk.Button(
    button_frame,
    text="Exit",
    bootstyle="danger",
    command=exit_app
).grid(row=0, column=2, padx=5)



app.config(
    menu=menu_bar
)


app.mainloop()

# data[].attributes.body
canva :https://canva.link/unoho50o1y3bztn

# data[].attributes.attachment_link.readable_text
skor = 0

def matematik():
    global skor
    print("Selamat Datang Ke Dunia Matematik !!!!")
    ans = input("Berapakah 20 + 20 + 20 +7? ")
    if ans == "67":
        print("Betul!! Bagus!!!!")
        skor += 10
    else:
        print("Jawapan anda salah. ")

def sains():
    global skor
    print("Selamat Datang Ke Dunia Sains !!!!")
    ans = input("Planet yang merupakan tempat tinggal manusia. ")
    if ans.lower() == "bumi":
        print("Betul! Pandaiiii !!!")
        skor += 10
    else:
        print("Jawapan anda salah.")

def inggeris():
    global skor
    print("Selamat Datang Ke Dunia Bahasa Inggeris !!!!")
    ans = input("Apakah sinonim bagi 'mistake' ? ")
    if ans.lower() == "error":
        print("Betul! Niceeeee !!!")
        skor += 10
    else:
        print("Jawapan anda salah.")

print("--------------------------------------")
print("      KNOWLEDGE QUEST")
print("--------------------------------------")
print("Selamat datang ke pengembaraan ilmu!")

matematik()
sains()
inggeris()

print("Jumlah Skor:", skor)

if skor == 30:
    print("Tahniah! Anda berjaya ialah Knowledge Quest Master !!!!")
else:
    print("Jangan berputus asa !! Cuba lagi untuk mendapat markah penuh!")

# data[].attributes.body
canva link:https://canva.link/jft6b4ag0tc9dna

# data[].attributes.attachment_link.readable_text
import pygame
import random
import sys

# ----------------------------
# SDG 3: Healthy Choice Game
# Objective:
# 1. Menggalakkan gaya hidup sihat
# 2. Mengajar pemain membuat pilihan yang baik
# 3. Meningkatkan kesedaran tentang kesihatan
# ----------------------------

pygame.init()

# Screen settings
WIDTH = 800
HEIGHT = 500
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("SDG 3 - Healthy Choice Game")

clock = pygame.time.Clock()

# Fonts
font = pygame.font.SysFont(None, 32)
big_font = pygame.font.SysFont(None, 50)

# Colors
WHITE = (255, 255, 255)
BLUE = (50, 120, 255)
GREEN = (0, 200, 0)
RED = (220, 50, 50)
BLACK = (0, 0, 0)
LIGHT_BLUE = (220, 245, 255)

# Player
player = pygame.rect(380, 430, 40, 40)
player_speed = 6

# Game variables
good_items = []
bad_items = []

score = 0
health = 5
spawn_timer = 0


def spawn_item():
    x = random.randint(0, WIDTH - 30)

    if random.random() < 0.5:
        # Healthy item
        good_items.append(pygame.Rect(x, -30, 30, 30))
    else:
        # Unhealthy item
        bad_items.append(pygame.Rect(x, -30, 30, 30))


running = True

while running:

    # Events
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    # Keyboard input
    keys = pygame.key.get_pressed()

    if keys[pygame.K_LEFT]:
        player.x -= player_speed

    if keys[pygame.K_RIGHT]:
        player.x += player_speed

    # Keep player inside screen
    if player.x < 0:
        player.x = 0

    if player.x > WIDTH - player.width:
        player.x = WIDTH - player.width

    # Spawn items
    spawn_timer += 1

    if spawn_timer >= 30:
        spawn_item()
        spawn_timer = 0

    # Move healthy items
    for item in good_items[:]:
        item.y += 5

        if item.colliderect(player):
            score += 1
            good_items.remove(item)

        elif item.y > HEIGHT:
            good_items.remove(item)

    # Move unhealthy items
    for item in bad_items[:]:
        item.y += 5

        if item.colliderect(player):
            health -= 1
            bad_items.remove(item)

        elif item.y > HEIGHT:
            bad_items.remove(item)

    # Drawing
    screen.fill(LIGHT_BLUE)

    # Player
    pygame.draw.rect(screen, BLUE, player)

    # Healthy items
    for item in good_items:
        pygame.draw.rect(screen, GREEN, item)

    # Unhealthy items
    for item in bad_items:
        pygame.draw.rect(screen, RED, item)

    # Instructions
    screen.blit(font.render("Green = Healthy Choice", True, GREEN), (10, 10))
    screen.blit(font.render("Red = Unhealthy Choice", True, RED), (10, 40))

    # Score and health
    screen.blit(font.render(f"Score : {score}", True, BLACK), (620, 10))
    screen.blit(font.render(f"Health : {health}", True, BLACK), (620, 40))

    # Game Over
    if health <= 0:
        game_over = big_font.render("GAME OVER", True, RED)
        screen.blit(game_over, (250, 180))

        message = font.render(
            "Remember: Make healthy choices every day!",
            True,
            BLACK,
        )
        screen.blit(message, (170, 250))

        pygame.display.update()
        pygame.time.wait(3000)
        break

    pygame.display.update()
    clock.tick(60)

pygame.quit()
sys.exit()

# data[].attributes.body
https://canva.link/bcbplroym0nk790

# data[].attributes.body
CANVA

https://canva.link/6vq3no68z8z6bk2

# data[].attributes.attachment_link.readable_text
import random
import json
import os

# Nama fail untuk menyimpan data haiwan
DATA_FILE = "haiwan_data.json"

# Data contoh haiwan (jika fail belum wujud)
DEFAULT_DATA = {
    "harimau": {
        "habitat": "Hutan hujan tropika, padang rumput, dan paya bakau",
        "pemakanan": "Karnivor (memburu rusa, babi hutan, dan haiwan kecil)",
        "jangka_hayat": "10-15 tahun (liar), sehingga 20 tahun (kurungan)",
        "nama_saintifik": "Panthera tigris",
        "fakta_menarik": "Harimau mempunyai corak belang yang unik seperti cap jari manusia."
    },
    "gajah": {
        "habitat": "Savana, hutan, dan padang rumput",
        "pemakanan": "Herbivor (daun, buah, kulit kayu, dan rumput)",
        "jangka_hayat": "60-70 tahun",
        "nama_saintifik": "Elephas maximus (Asia), Loxodonta africana (Afrika)",
        "fakta_menarik": "Gajah adalah haiwan darat terbesar di bumi."
    },
    "panda": {
        "habitat": "Hutan buluh di pergunungan China",
        "pemakanan": "Herbivor (99% daripada diet adalah buluh)",
        "jangka_hayat": "14-20 tahun (liar), sehingga 30 tahun (kurungan)",
        "nama_saintifik": "Ailuropoda melanoleuca",
        "fakta_menarik": "Panda menghabiskan 12-16 jam sehari untuk makan buluh."
    },
    "kuda": {
        "habitat": "Padang rumput, savana, dan kawasan lapang",
        "pemakanan": "Herbivor (rumput, jerami, dan bijirin)",
        "jangka_hayat": "25-30 tahun",
        "nama_saintifik": "Equus ferus caballus",
        "fakta_menarik": "Kuda boleh tidur sambil berdiri kerana mekanisme penguncian lutut."
    },
    "ikan lumba-lumba": {
        "habitat": "Lautan dan sungai di seluruh dunia",
        "pemakanan": "Karnivor (ikan, sotong, dan krustasea)",
        "jangka_hayat": "20-30 tahun (liar), sehingga 40 tahun (kurungan)",
        "nama_saintifik": "Delphinidae (keluarga)",
        "fakta_menarik": "Ikan lumba-lumba berkomunikasi menggunakan siulan dan bunyi klik."
    }
}

def muat_data():
    """Memuatkan data haiwan daripada fail JSON atau membuat fail baharu jika tiada."""
    if os.path.exists(DATA_FILE):
        with open(DATA_FILE, 'r', encoding='utf-8') as file:
            return json.load(file)
    else:
        simpan_data(DEFAULT_DATA)
        return DEFAULT_DATA

def simpan_data(data):
    """Menyimpan data haiwan ke dalam fail JSON."""
    with open(DATA_FILE, 'w', encoding='utf-8') as file:
        json.dump(data, file, indent=4, ensure_ascii=False)

def dapatkan_fakta_haiwan(data, nama_haiwan):
    """Mengembalikan fakta khusus tentang haiwan yang dicari."""
    nama_haiwan = nama_haiwan.lower().strip()
    
    if nama_haiwan in data:
        info = data[nama_haiwan]
        fakta = """
=== FAKTA TENTANG {nama_haiwan.upper()} ===
Nama Saintifik: {info['nama_saintifik']}
Habitat: {info['habitat']}
Pemakanan: {info['pemakanan']}
Jangka Hayat: {info['jangka_hayat']}
Fakta Menarik: {info['fakta_menarik']}
"""
        return fakta
    else:
        return "Maaf, tiada maklumat untuk haiwan '{nama_haiwan}'. Sila cuba nama lain."

def fakta_rawak_hari_ini(data):
    """Menjana fakta rawak tentang haiwan untuk 'hari ini'."""
    haiwan_rawak = random.choice(list(data.keys()))
    fakta_rawak = random.choice([
        "Tahukah anda? {data[haiwan_rawak]['fakta_menarik']}",
        "Info ringkas: {haiwan_rawak.upper()} boleh hidup sehingga {data[haiwan_rawak]['jangka_hayat']}.",
        "Habitat {haiwan_rawak}: {data[haiwan_rawak]['habitat']}.",
        "{haiwan_rawak.upper()} (Nama saintifik: {data[haiwan_rawak]['nama_saintifik']}) adalah {data[haiwan_rawak]['pemakanan']}.",
        "Fakta unik: {data[haiwan_rawak]['fakta_menarik']}"
    ])
    
    """
=== FAKTA HAIWAN RAWAK UNTUK HARI INI ===
Haiwan Pilihan: {haiwan_rawak.upper()}
{fakta_rawak}
"""

def tambah_haiwan_baru(data):
    """Menambah haiwan baharu ke dalam ensiklopedia."""
    print("\n=== TAMBAH HAIWAN BAHARU ===")
    nama = input("Nama haiwan: ").lower().strip()
    
    if nama in data:
        print("Haiwan '{nama}' sudah wujud dalam ensiklopedia.")
        return data
    
    habitat = input("Habitat: ")
    pemakanan = input("Pemakanan (Karnivor/Herbivor/Omnivor): ")
    jangka_hayat = input("Jangka hayat: ")
    nama_saintifik = input("Nama saintifik: ")
    fakta_menarik = input("Fakta menarik: ")
    
    data[nama] = {
        "habitat": habitat,
        "pemakanan": pemakanan,
        "jangka_hayat": jangka_hayat,
        "nama_saintifik": nama_saintifik,
        "fakta_menarik": fakta_menarik
    }
    
    simpan_data(data)
    print("Haiwan '{nama}' berjaya ditambahkan!")
    return data

def senarai_haiwan(data):
    """Memaparkan senarai semua haiwan dalam ensiklopedia."""
    print("\n=== SENARAI HAIWAN DALAM ENSIKLOPEDIA ===")
    for i, haiwan in enumerate(sorted(data.keys()), 1):
        print("{i}. {haiwan.capitalize()}")
    print("\nJumlah: {len(data)} haiwan")

def main():
    """Fungsi utama program."""
    data = muat_data()
    
    while True:
        print("\n" + "="*50)
        print("    ENSIKLOPEDIA HAIWAN / PENJANA FAKTA")
        print("="*50)
        print("1. Cari fakta khusus haiwan")
        print("2. Fakta rawak haiwan untuk hari ini")
        print("3. Senarai semua haiwan")
        print("4. Tambah haiwan baharu")
        print("5. Keluar")
        print("="*50)
        
        pilihan = input("Pilihan anda (1-5): ").strip()
        
        if pilihan == "1":
            nama = input("\nMasukkan nama haiwan: ")
            print(dapatkan_fakta_haiwan(data, nama))
            
        elif pilihan == "2":
            print(fakta_rawak_hari_ini(data))
            
        elif pilihan == "3":
            senarai_haiwan(data)
            
        elif pilihan == "4":
            data = tambah_haiwan_baru(data)
            
        elif pilihan == "5":
            print("\nTerima kasih menggunakan Ensiklopedia Haiwan! Selamat belajar!")
            break
            
        else:
            print("\nPilihan tidak sah. Sila pilih 1-5.")
        
        input("\nTekan Enter untuk meneruskan...")

if __name__ == "__main__":
    main()

# data[].attributes.body
https://canva.link/3tt14314bcuo6o3

# data[].attributes.attachment_link.readable_text
print("Welcome to the Computer Quiz Game!")
print("Answer the questions by typing A, B, C, or D.")
print("----------------------------------")

score = 0

# Question 1print("1. What does CPU stand for?")
print("A. Central Processing Unit")
print("B. Computer Personal Unit")
print("C. Central Program Unit")
print("D. Control Processing Unit")

answer = input("Your answer: ").upper()

if answer == "A":
    print("Correct!")
    score += 1
else:
    print("Wrong! The correct answer is A. Central Processing Unit")

print("----------------------------------")

# Question 2print("2. Which device is used to move the cursor on a computer?")
print("A. Keyboard")
print("B. Printer")
print("C. Mouse")
print("D. Monitor")

answer = input("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    score += 1
else:
    print("Wrong! The correct answer is C. Mouse")

print("----------------------------------")

# Question 3print("3. Which of these is an operating system?")
print("A. Microsoft Word")
print("B. Windows")
print("C. Google Chrome")
print("D. PowerPoint")

answer = input("Your answer: ").upper()

if answer == "B":
    print("Correct!")
    score += 1
else:
    print("Wrong! The correct answer is B. Windows")

print("----------------------------------")

# Question 4print("4. Which key is commonly used to delete text?")
print("A. Enter")
print("B. Shift")
print("C. Delete")
print("D. Ctrl")

answer = input("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    score += 1
else:
    print("Wrong! The correct answer is C. Delete")

print("----------------------------------")

# Question 5print("5. Which company created the Windows operating system?")
print("A. Apple")
print("B. Google")
print("C. Microsoft")
print("D. Samsung")

answer = input("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    score += 1
else:
    print("Wrong! The correct answer is C. Microsoft")

print("----------------------------------")

print("Quiz Finished!")
print("Your final score is", score, "out of 5")

if score == 5:
    print("Excellent! You are a computer expert!")
elif score >= 3:
    print("Good job! Keep learning!")
else:
    print("Nice try! Study and try again!")

# data[].attributes.body
canva link:

https://canva.link/s4rov60dyypd7i9

# data[].attributes.attachment_link.readable_text
import pygame
import random
import math

# Initialize pygame
pygame.init()

# Screen settings (Smaller map for Trinket and tighter gameplay)
WIDTH, HEIGHT = 640, 480
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Forest Animal Search Game - Deluxe Version")

# Colors
GREEN = (40, 150, 60)
DARK_GREEN = (25, 90, 40)
LIGHT_GREEN = (60, 180, 80)
SHADOW = (15, 60, 25)
BROWN = (110, 55, 15)
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
BLUE = (40, 110, 240)
LIGHT_BLUE = (120, 180, 255)
CYAN = (0, 255, 255)
YELLOW = (255, 220, 50)
ORANGE = (255, 120, 0)
RED = (240, 40, 40)
DARK_RED = (140, 15, 15)

# Fonts
font = pygame.font.Font(None, 24)
bold_font = pygame.font.Font(None, 26)
big_font = pygame.font.Font(None, 56)

# Clock
clock = pygame.time.Clock()
FPS = 60

# Player settings
player_size = 32
player_x = WIDTH // 2
player_y = HEIGHT // 2
player_speed = 4
lives = 3
score = 0

# Visual Effect: Trail particles for player
player_trail = []

# Shield settings
shield_duration = 10 * 1000  
shield_timer = 0  

# Game Mechanics
BASE_ENEMY_SPEED = 1.8
current_enemy_speed = BASE_ENEMY_SPEED

# Friendly animals
friendly_size = 24
friendly_animals = []

# Ferocious animals
enemy_size = 32
enemies = []

# Decorative environment features
trees = []
for _ in range(12):
    trees.append((random.randint(40, WIDTH - 40), random.randint(60, HEIGHT - 40)))

grass_tufts = []
for _ in range(30):
    grass_tufts.append((random.randint(10, WIDTH - 10), random.randint(50, HEIGHT - 10)))

def spawn_friendly():
    x = random.randint(20, WIDTH - 20)
    y = random.randint(60, HEIGHT - 20)
    friendly_animals.append(pygame.Rect(x, y, friendly_size, friendly_size))

def spawn_enemy():
    x = random.randint(20, WIDTH - 20)
    y = random.randint(60, HEIGHT - 20)
    while math.hypot(x - WIDTH//2, y - HEIGHT//2) < 120:
        x = random.randint(20, WIDTH - 20)
        y = random.randint(60, HEIGHT - 20)
    enemies.append(pygame.Rect(x, y, enemy_size, enemy_size))

def reset_enemy_positions():
    for enemy in enemies:
        x = random.randint(20, WIDTH - 20)
        y = random.randint(60, HEIGHT - 20)
        while math.hypot(x - WIDTH//2, y - HEIGHT//2) < 150:
            x = random.randint(20, WIDTH - 20)
            y = random.randint(60, HEIGHT - 20)
        enemy.x = x
        enemy.y = y

def draw_forest():
    screen.fill(GREEN)
    
    # Draw grass tufts
    for gx, gy in grass_tufts:
        pygame.draw.line(screen, LIGHT_GREEN, (gx, gy), (gx - 3, gy - 6), 2)
        pygame.draw.line(screen, LIGHT_GREEN, (gx, gy), (gx + 3, gy - 6), 2)
        pygame.draw.line(screen, LIGHT_GREEN, (gx, gy), (gx, gy - 8), 2)

    # Draw Trees with layered depths
    for tx, ty in trees:
        # Ground Shadow
        pygame.draw.ellipse(screen, SHADOW, (tx - 22, ty + 10, 44, 12))
        # Trunk
        pygame.draw.rect(screen, BROWN, (tx - 5, ty + 2, 10, 16))
        # Layered Foliage (Bottom to top)
        pygame.draw.circle(screen, DARK_GREEN, (tx, ty - 2), 20)
        pygame.draw.circle(screen, GREEN, (tx, ty - 8), 16)
        pygame.draw.circle(screen, LIGHT_GREEN, (tx - 3, ty - 12), 11)

def move_enemies():
    global lives, player_x, player_y
    player_center_x = player_x + player_size // 2
    player_center_y = player_y + player_size // 2

    for enemy in enemies:
        enemy_center_x = enemy.x + enemy_size // 2
        enemy_center_y = enemy.y + enemy_size // 2

        dx = player_center_x - enemy_center_x
        dy = player_center_y - enemy_center_y
        distance = math.hypot(dx, dy)

        if distance < 200 and distance != 0:
            enemy.x += int(current_enemy_speed * dx / distance)
            enemy.y += int(current_enemy_speed * dy / distance)
        else:
            enemy.x += random.randint(-1, 1)
            enemy.y += random.randint(-1, 1)

    # Separation logic
    for i in range(len(enemies)):
        for j in range(len(enemies)):
            if i != j:
                ent1 = enemies[i]
                ent2 = enemies[j]
                dist = math.hypot((ent1.x - ent2.x), (ent1.y - ent2.y))
                min_dist = enemy_size - 2
                if dist < min_dist and dist > 0:
                    ent1.x += int(((ent1.x - ent2.x) / dist) * 1.5)
                    ent1.y += int(((ent1.y - ent2.y) / dist) * 1.5)

    for enemy in enemies:
        enemy.x = max(0, min(WIDTH - enemy_size, enemy.x))
        enemy.y = max(0, min(HEIGHT - enemy_size, enemy.y))

def check_collisions(player_rect, current_time):
    global score, lives, player_x, player_y, current_enemy_speed, shield_timer

    for animal in friendly_animals[:]:
        if player_rect.colliderect(animal):
            friendly_animals.remove(animal)
            score += 1
            current_enemy_speed = BASE_ENEMY_SPEED + (score * 0.12)
            if score % 3 == 0:
                spawn_enemy()
            spawn_friendly()

    if current_time > shield_timer:
        for enemy in enemies:
            if player_rect.colliderect(enemy):
                lives -= 1
                player_x = WIDTH // 2
                player_y = HEIGHT // 2
                reset_enemy_positions()
                shield_timer = current_time + shield_duration
                pygame.time.delay(300)
                break

def draw_objects(player_rect, current_time):
    # Draw Player Trail
    for trail in player_trail:
        pygame.draw.rect(screen, (30, 80, 200), (trail[0], trail[1], player_size, player_size), 2)
    
    # Player Shadow & Body
    pygame.draw.ellipse(screen, SHADOW, (player_rect.x, player_rect.bottom - 4, player_size, 8))
    pygame.draw.rect(screen, BLUE, player_rect, 0, 6) # Rounded corners
    pygame.draw.rect(screen, LIGHT_BLUE, (player_rect.x + 4, player_rect.y + 4, player_size - 8, player_size - 8), 0, 4)
    # Visual core
    pygame.draw.circle(screen, WHITE, player_rect.center, player_size // 5)
    
    # Shield Effect
    if current_time < shield_timer:
        pulse = int(math.sin(current_time * 0.01) * 3)
        pygame.draw.circle(screen, CYAN, player_rect.center, player_size // 2 + 8 + pulse, 2)

    # Friendly Animals
    for animal in friendly_animals:
        cx, cy = animal.centerx, animal.centery
        r = friendly_size // 2
        # Shadow
        pygame.draw.ellipse(screen, SHADOW, (animal.x, animal.bottom - 3, friendly_size, 6))
        # Body
        pygame.draw.circle(screen, ORANGE, (cx, cy), r)
        pygame.draw.circle(screen, YELLOW, (cx, cy), r - 4)
        # Ears
        pygame.draw.circle(screen, ORANGE, (animal.x + 4, animal.y + 2), 5)
        pygame.draw.circle(screen, ORANGE, (animal.right - 4, animal.y + 2), 5)
        # Face details
        pygame.draw.circle(screen, BLACK, (cx - 4, cy - 1), 2)
        pygame.draw.circle(screen, BLACK, (cx + 4, cy - 1), 2)

    # Enemies
    pulse_offset = math.sin(current_time * 0.007) * 2
    for enemy in enemies:
        # Angry Aura Glow
        pygame.draw.rect(screen, (255, 100, 100), (enemy.x - 2, enemy.y - 2, enemy_size + 4, enemy_size + 4), 1, 4)
        # Shadow
        pygame.draw.ellipse(screen, SHADOW, (enemy.x, enemy.bottom - 2, enemy_size, 6))
        # Base Body
        pygame.draw.rect(screen, DARK_RED, enemy, 0, 4)
        
        # Inner shifting design based on pulse
        inner = pygame.Rect(enemy.x + 4, enemy.y + 4, enemy_size - 8, enemy_size - 8)
        pygame.draw.rect(screen, RED, inner, 0, 2)
        
        # Glowing Eyes
        eye_y_adj = int(pulse_offset)
        pygame.draw.circle(screen, YELLOW, (enemy.x + 9, enemy.y + 12 + eye_y_adj), 3)
        pygame.draw.circle(screen, RED, (enemy.x + 9, enemy.y + 12 + eye_y_adj), 1)
        pygame.draw.circle(screen, YELLOW, (enemy.right - 9, enemy.y + 12 + eye_y_adj), 3)
        pygame.draw.circle(screen, RED, (enemy.right - 9, enemy.y + 12 + eye_y_adj), 1)

def draw_ui(current_time):
    # Top HUD background panel bar
    pygame.draw.rect(screen, (20, 35, 25), (0, 0, WIDTH, 45))
    pygame.draw.line(screen, LIGHT_GREEN, (0, 45), (WIDTH, 45), 2)

    # Texts
    score_text = bold_font.render(f"SCORE: {score}", True, WHITE)
    lives_text = bold_font.render(f"LIVES: {lives}", True, RED if lives == 1 else WHITE)
    screen.blit(score_text, (20, 13))
    screen.blit(lives_text, (150, 13))
    
    if current_time < shield_timer:
        seconds_left = int(math.ceil((shield_timer - current_time) / 1000.0))
        shield_text = font.render(f"������� SHIELD ACTIVE: {seconds_left}s", True, CYAN)
        screen.blit(shield_text, (260, 14))

    danger_val = int((current_enemy_speed - BASE_ENEMY_SPEED)*10) + 1
    speed_text = bold_font.render(f"DANGER LVL: {danger_val}", True, ORANGE)
    screen.blit(speed_text, (WIDTH - 160, 13))

def game_over_screen():
    screen.fill((15, 15, 20))
    # Outer box red accent frame
    pygame.draw.rect(screen, DARK_RED, (40, 40, WIDTH - 80, HEIGHT - 80), 4, 8)

    text1 = big_font.render("GAME OVER", True, RED)
    text2 = bold_font.render(f"Final Score Secured: {score}", True, WHITE)
    text3 = font.render("Press [ R ] to Restart   ���   Press [ Q ] to Quit", True, LIGHT_BLUE)

    screen.blit(text1, (WIDTH // 2 - text1.get_width() // 2, 140))
    screen.blit(text2, (WIDTH // 2 - text2.get_width() // 2, 220))
    screen.blit(text3, (WIDTH // 2 - text3.get_width() // 2, 280))
    pygame.display.update()

def reset_game():
    global player_x, player_y, lives, score, friendly_animals, enemies, current_enemy_speed, shield_timer, player_trail
    player_x = WIDTH // 2
    player_y = HEIGHT // 2
    lives = 3
    score = 0
    player_trail = []
    current_enemy_speed = BASE_ENEMY_SPEED
    shield_timer = pygame.time.get_ticks() + shield_duration  
    friendly_animals = []
    enemies = []
    for _ in range(4):
        spawn_friendly()
    for _ in range(2):
        spawn_enemy()

reset_game()

running = True
while running:
    clock.tick(FPS)
    current_time = pygame.time.get_ticks()

    if lives <= 0:
        game_over_screen()
        waiting = True
        while waiting:
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    running = False
                    waiting = False
                if event.type == pygame.KEYDOWN:
                    if event.key == pygame.K_r:
                        reset_game()
                        waiting = False
                    elif event.key == pygame.K_q:
                        running = False
                        waiting = False
        continue

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    # Store player position for trail before movement
    player_trail.append((player_x, player_y))
    if len(player_trail) > 5: # Max trail elements length
        player_trail.pop(0)

    keys = pygame.key.get_pressed()
    moved = False
    if keys[pygame.K_LEFT] or keys[pygame.K_a]:
        player_x -= player_speed
        moved = True
    if keys[pygame.K_RIGHT] or keys[pygame.K_d]:
        player_x += player_speed
        moved = True
    if keys[pygame.K_UP] or keys[pygame.K_w]:
        player_y -= player_speed
        moved = True
    if keys[pygame.K_DOWN] or keys[pygame.K_s]:
        player_y += player_speed
        moved = True

    # Fade out trail if stationary
    if not moved and player_trail:
        player_trail.pop(0)

    player_x = max(0, min(WIDTH - player_size, player_x))
    player_y = max(0, min(HEIGHT - player_size, player_y))

    player_rect = pygame.Rect(player_x, player_y, player_size, player_size)

    move_enemies()
    check_collisions(player_rect, current_time)

    draw_forest()
    draw_objects(player_rect, current_time)
    draw_ui(current_time)

    pygame.display.update()

pygame.quit()

# data[].attributes.body
Canva Link：

https://canva.link/ssge2q718phxcyq

# data[].attributes.attachment_link.readable_text
name = input("Type your name")
print("Welcome",name,"to this game!")
print("My topic is Sustainable Development Goal 4 (SDG 4): Quality Education.")
print("I will give you some question about SDG 4 and you need to answer correctly.")

answer = input("Welcome to answer my question ���: .���. o(���������)o .���.:���. Are you ready!!!!!")

if answer == "yes":
    print("Great! q(���������q)")

print("Answer the questions by typingA,B,C or D.")
print("-------------------------------------------")

score = 0

# Question 1
print("1. What can you do to help SDG 4?")
print("A. Help others learn")
print("B. Waste books")
print("C. Skip school every day")
print("D. Break school rules")

answer = input("Your answer: ").upper()

if answer == "A":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is A. Help others learn")
print("-------------------------------------------")    

# Question 2
print("2. Which action supports quality education?")
print("A. Throw books away")
print("B. Stop children from learning")
print("C. Donate books to students")
print("D.Ignore education")

answer = input("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is C. Donate books to students ")
print("-------------------------------------------")   

# Question 3
print("3.How can students help SDG 4?")
print("A.Cheat in exams")
print("B.Study hard and help classmates")
print("C.Bully classmates")
print("D.Miss school often")

answer = input("Your answer: ").upper()

if answer == "B":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is .Study hard and help classmates")
print("-------------------------------------------")   

# Question 4
print("4.What can adults do to support SDG 4?")
print("A.Volunteer to teach or tutor")
print("B.Prevent children from going to school")
print("C.Prevent children from going to school")
print("D.Discourage learning")

answer = input("Your answer: ").upper()

if answer == "A":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is A.Volunteer to teach or tutor")
print("-------------------------------------------") 

# Question 5
print("5.Which of these is a good way to promote education?")
print("A.Keep books only for yourself")
print("B.Waste school resources")
print("C.Tell people not to study")
print("D.Share learning materials with others")

answer = input("Your answer: ").upper()

if answer == "D":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is D.Share learning materials with others")
print("-------------------------------------------") 

print("Quiz finished!")
print("Your final score is:", score, "out of 5")

if score == 5:
    print("That���s incredible! You���re the best!(��������`���)")
elif score >= 3:
    print("Great job! Keep it up!���_���")
else:
    print("Not a bad try!`(>���<)���")

# data[].attributes.body
https://canva.link/bud6n2jdhfe3x4a

# data[].attributes.attachment_link.readable_text
print("=========================================")
print("WELCOME TO THE FOOD WASTE AWARENESS QUIZ!")
print("=========================================\n")
print("Test your knowledge and learn how to reduce food waste.\n")

# Track the user's score
score = 0

# --- QUESTION 1 ---
print("Question 1: Roughly what percentage of all food produced globally is wasted?")
print("A) 10%")
print("B) 33% (One-third)")
print("C) 50%")

answer1 = input("Your answer (A, B, or C): ").strip().upper()

if answer1 == "B":
    print("��� orrect! Nearly one-third of all food produced globally goes to waste.\n")
    score += 1
else:
    print("��� Incorrect. The correct answer is B. Around 33% of food is lost or wasted.\n")

print("-----------------------------------------")

# --- QUESTION 2 ---
print("Question 2: Which of these is the BEST way to reduce food waste at home?")
print("A) Buying extra food just in case")
print("B) Throwing away food as soon as it hits the 'Best Before' date")
print("C) Making a meal plan and a shopping list before going to the store")

answer2 = input("Your answer (A, B, or C): ").strip().upper()

if answer2 == "C":
    print("��� Correct! Planning meals helps you buy only what you will actually eat.\n")
    score += 1
else:
    print("��� Incorrect. The correct answer is C. Meal planning is a super effective way to prevent waste.\n")

print("-----------------------------------------")

# --- QUESTION 3 ---
print("Question 3: If Food Waste were a country, where would it rank in greenhouse gas emissions?")
print("A) 1st (Above China)")
print("B) 3rd (Behind China and the USA)")
print("C) 50th")

answer3 = input("Your answer (A, B, or C): ").strip().upper()

if answer3 == "B":
    print("��� Correct! Food waste creates massive amounts of methane in landfills, making it the 3rd largest emitter.\n")
    score += 1
else:
    print("��� Incorrect. The correct answer is B. It would be the 3rd largest greenhouse gas emitter!\n")

print("-----------------------------------------")

# --- FINAL SCORE ---
print("=========================================")
print("QUIZ COMPLETE!")
print("=========================================")
print("Your Final Score: " + str(score) + "/3")

if score == 3:
    print("���� Amazing! You are a Food Waste Prevention Expert!")
elif score == 2:
    print("���� Good job! You know your stuff, but there is still room to grow.")
else:
    print("���� Keep learning! Every small change helps save food and the planet.")
print("=========================================")

# data[].attributes.body
https://canva.link/grfn4u0rqopbcc7

# data[].attributes.attachment_link.readable_text
#���starting 
print ("Welcome to Ecoquest���")

input("\n(Press Enter to continue...)") 
print ("=============================================")
print ("Far beyond the smoky mountains and plastic rivers stood the Kingdom of Earthia. Once, it was filled with green forests, clean oceans, and happy people. But over time, humans wasted food, threw rubbish everywhere, and bought more than they needed.")
print ("From all that wastes a monster was born.His name was the Rubbish King.")
print ("=============================================")

input("\n(Press Enter to continue...)") 
print ("=============================================")
print("Every day he grew bigger ��� fed by plastic bottles, food waste, broken electronics, and polluted smoke.")
print ("His castle was made of garbage mountains, and dark clouds covered the sky.The people were afraid.")
print("Then one day, a young traveler named Aiden stepped forward.")
print ("Aiden:'I will stop it'.")
print ("=============================================")

input("\n(Press Enter to continue...)") 
print ("=============================================")
print ("Your goal: Help Aiden to defeat the Rubbish King'")
print ("To defeact the Rubbish King, you must answer these questions correctly.")
print ("=============================================")
input("\n(Press Enter to continue...)")

#question group1
print("==============================================")
print ("The Second Challenge: The Forest of Waste")
#q1
print ("Trash Guard: 1. What does the word 'deforestation' mean?")
print ("A. Planting more trees B. Cutting down many trees c. Cleaning a forest D. Watering plants")
answer =input ("your answer:").upper()
if answer == "B":
 print ("correct���")
else :
 print ("Wrong���.Correct answer is B.")

#q2
print("                                            ") 
print ("Trash guard: 2. Which word means protecting forests and nature?")
print ("A. Pollution B. Deforestation C. Waste D. Conservation ")
answer =input ("your answer:").upper()
if answer == "D":
 print ("correct���")
else :
 print ("Wrong���.Correct answer is D.")

#q3
print ("                                            ")
print ("Trash Guard: 3. What is 'biodegradable'?")
print ("A. Cannot be broken down B. Can break down naturally C. Made of metal D. Very expensive")
answer =input ("your answer:").upper()
if answer == "B":
 print ("correct���")
else :
 print ("Wrong���.Correct answer is B.")
print("===============================================")
#question group2
print("==============================================")
print ("The First Challenge: The River of Plastic")
#q1
print ("Water spirit: 1.What does 'pollution' mean?")
print ("A. Making the environment dirty B. Cleaning a river C. Growing plants D. Saving water")
answer =input ("your answer:").upper()
if answer == "A":
 print ("correct���")
else :
 print ("Wrong���.Correct answer is A.")

#q2
print("                                            ") 
print ("Water spirit: 2. What does 'contamination' mean?")
print ("A. Making something dirty or unsafe B. Recycling waste C. Growing trees D. Cleaning water ")
answer =input ("your answer:").upper()
if answer == "A":
 print ("correct���")
else :
 print ("Wrong���.Correct answer is A.")

#q3
print ("                                            ")
print ("Water spirit: 3.What is 'sewage'?")
print ("A. Clean drinking water B. Wastewater from homes and toilets C. Rainwater D. River fish")
answer =input ("your answer:").upper()
if answer == "B":
 print ("correct���")
else :
 print ("Wrong���.Correct answer is B.")
print("===============================================")
#question group3
print("==============================================")
print ("The Third Challenge: Market of Endless Buying")
#q1
print ("Receipt Robot: 1.What is 'overconsumption'?")
print ("A. Saving money B. Recycling waste C. Buying or using more than you need D. Sharing items")
answer =input ("your answer:").upper()
if answer == "C":
 print ("correct���")
else :
 print ("Wrong���.Correct answer is C.")

#q2
print("                                            ") 
print ("Receipt Robot: 2.What is the meaning of 'reusable'?")
print ("A. Cannot be cleaned B. Made from glass only C. Can only be used once D. Can be used again many times .")
answer =input ("your answer:").upper()
if answer == "D":
 print ("correct���")
else :
 print ("Wrong���.Correct answer is D.")


#q3
print ("                                            ")
print ("Receipt Robot: What does 'impulse buying' mean?")
print ("A. Selling products online B. Returning an item C. Buying something without planning D. Buying only what you need")
answer =input ("your answer:").upper()
if answer == "C":
 print ("correct���")
else :
 print ("Wrong���.Correct answer is C.")
print("===============================================")
#question group4 {final}
print("==============================================")
print ("The Final Challenge: The Rubbish King")
print ("Congratulation! You have completed all the previous challenges.")
print ("Now, there is only ONE enemy left...���� THE RUBBISH KING!He has polluted forests, rivers, and cities with rubbish.")
print ("~Game Rule~")
print ("���Health point: 100HP")
print ("���Correct: -20HP")
print ("���Wrong: +20HP (max:100HP)")
print ("Are you ready?")
input("\n(Press Enter to start...)") 

HP = 100
#q1
print ("health point : "+ str(HP) +"HP")
print ("Rubbish King: 1.What does 'responsibility' mean?")
print ("A. Ignoring problems B. Doing what you should do C. Playing games D. Making noise")
answer =input ("your answer:").upper()
if answer == "B":
 print ("correct���")
 HP = (HP)-20
else :
 print ("Wrong���.Correct answer is B.")
 if HP != 100:
  HP = (HP)+20
print ("health point : "+ str(HP) +"HP")


#q2
print("                                            ") 
print ("Rubbish King: 2.What is the best definition of recycling?")
print ("A. Turning used materials into new products. B. Burning rubbish. C. Throwing rubbish into bins. D. Buying new products.")
answer =input ("your answer:").upper()
if answer == "A":
 print ("correct���")
 HP =(HP)-20
else :
 print ("Wrong���.Correct answer is A.")
 if HP != 100:
  HP = (HP)+20
print ("health point : "+ str(HP) +"HP")


#q3
print ("                                            ")
print ("Rubbish King: Which item belongs in a recycling bin?")
print ("A. Leftover soup. B. Dirty tissue. C. Banana peel. D. Plastic bottle.")
answer =input ("your answer:").upper()
if answer == "D":
 print ("correct���")
 HP =(HP)-20
else :
 print ("Wrong���.Correct answer is D.")
 if HP != 100:
  HP = (HP)+20
print ("health point : "+ str(HP) +"HP")


#q4
print ("                                            ")
print ("Rubbish King: 4.Why should electronic waste (e-waste) be recycled properly?")
print ("A. It contains valuable materials and harmful substances. B. It disappears naturally C. It can be thrown into rivers safely. D. It is made only of paper.")
answer =input ("your answer:").upper()
if answer == "A":
 print ("correct���")
 HP =(HP)-20
else :
 print ("Wrong���.Correct answer is A.")
 if HP != 100:
  HP = (HP)+20
print ("health point : "+ str(HP) +"HP")


#q5
print ("                                            ")
print ("Rubbish King: 5.Which product is the most environmentally friendly?")
print (" A single-use plastic cup. B. A plastic straw. C. Adisposable plastic bottle. D. A refillable water bottle. ")
answer =input ("your answer:").upper()
if answer == "D":
 print ("correct���")
 HP =(HP)-20
else :
 print ("Wrong���.Correct answer is A.")
 if HP != 100:
  HP = (HP)+20
print ("health point : "+ str(HP) +"HP")

print("===============================================")
input ("\n(Press enter to continue...)")
if HP ==0:
 print("����Congratulations!!!You defeated the Rubbish King.You have achieved the goal of SDG 12")
 print("The skies cleared. Rivers sparkled. Animals returned. Not through strength��� but through responsibility. And from that day on, the people remembered")
else:
  print ("���� MISSION FAILED")
  print("The Rubbish King became stronger because of our choices.The battle is lost, but the fight for a cleaner planet is never over. Try again next time!����")

input ("\n(Press enter to continue...)")
print ("The Earth does not need perfect heroes. It needs responsible humans.")

input ("\n(Press enter to continue...)")
print ("Thank you for playing!")

# data[].attributes.body
https://canva.link/82kwetx125incd5

# data[].attributes.attachment_link.readable_text




import time
import sys

def clear_screen():
    # Prints blank lines to simulate clearing the phone screen
    print("\n" * 20)

def phone_lockdown():
    clear_screen()
    print("=========================================")
    print("��� ��� ���  PHONE SECURITY LOCKDOWN  ��� ��� ���")
    print("=========================================")
    print("\n[SYSTEM] Violation: Failed to sustain eco-lifestyle rules.")
    print("[SYSTEM] Status: DEVICE LOCKED.")
    print("\nReflecting time initiated...")
    
    # Countdown timer simulating the lock
    for i in range(5, 0, -1):
        print("Unlocking in " + str(i) + " seconds...")
        time.sleep(1)
        
    print("\n[SYSTEM] Device unlocked. Please log a green action.")
    time.sleep(2)

def take_eco_photo():
    clear_screen()
    print("=========================================")
    print("����  ECOSNAP: PHOTO LOGGING MODE         ")
    print("=========================================")
    print("\nWhat eco-friendly lifestyle action are you photographing?")
    print("1. Using a reusable cup/bottle")
    print("2. Recycling plastic/paper")
    print("3. Eating a plant-based meal")
    print("4. Custom green action")
    
    choice = input("\nSelect choice (1-4): ")
    
    if choice in ["1", "2", "3", "4","5"]:
        print("\n[CAMERA] *CHIK* ���� Photo uploaded successfully!")
        print("[SYSTEM] Verification passed. Thank you for helping the planet!")
        print("[SYSTEM] Phone status: SAFE & UNLOCKED.")
    else:
        print("\nInvalid choice. Photo failed.")
    
    input("\nPress Enter to return to Home Screen...")

def main_app():
    while True:
        clear_screen()
        print("Welcome to SafeEarth")
        print("=========================================")
        print("���� SMARTPHONE HOME SCREEN - ECO-GUARD    ")
        print("=========================================")
        print("Current Status: SECURE ���")
        print("-----------------------------------------")
        print("Daily Task: Take a photo of your green lifestyle!")
        print("\nWhat would you like to do?")
        print("1) ���� Take Eco Photo (Keep phone unlocked)")
        print("2) ���� Open Social Media (Skip eco-task)")
        print("3) ���� Open Games (Skip eco-task)")
        print("4) ���� Turn off phone")
        print("5) X I dont want to follow")
        
        action = input("\nChoose an option (1-5): ")
        
        if action == "1":
            take_eco_photo()
        elif action in ["2", "3"]:
            print("\n[!] Access Denied. You haven't proven your eco-action today!")
            time.sleep(1.5)
            phone_lockdown()
        elif action == "4":
            print("\nShutting down... Goodbye!")
            break
        else:
            print("\nInvalid option. Try again.")
            time.sleep(1)
        
          

# Start the app
main_app()

# data[].attributes.body
https://canva.link/jp94n313ksbbnhe

# data[].attributes.attachment_link.readable_text
# PERMAINAN PENGEMBARAAN PEMBELAJARAN BAHASA

score = 0

def menu():
    print("\n==============================")
    print(" PERMAINAN PENGEMBARAAN")
    print(" PEMBELAJARAN BAHASA")
    print("==============================")
    print("1. Mula Permainan")
    print("2. Keluar")

def permainan():
    global score

    print("\nSelamat Datang!")
    print("Anda perlu menjawab soalan dengan betul.")

    soalan = [
        {
            "perkataan": "Apple",
            "jawapan": "epal"
        },
        {
            "perkataan": "Book",
            "jawapan": "buku"
        },
        {
            "perkataan": "School",
            "jawapan": "sekolah"
        },
        {
            "perkataan": "Cat",
            "jawapan": "kucing"
        },
        {
            "perkataan": "Water",
            "jawapan": "air"
        }
    ]

    for item in soalan:
        print("\nApakah maksud perkataan:")
        print(item["perkataan"])

        jawapan = input("Jawapan: ").lower()

        if jawapan == item["jawapan"]:
            print("Betul!")
            score += 10
        else:
            print("Salah.")
            print("Jawapan yang betul ialah:", item["jawapan"])

    print("\nPermainan Tamat!")
    print("Markah anda:", score)

while True:
    menu()
    pilihan = input("Pilih: ")

    if pilihan == "1":
        permainan()

    elif pilihan == "2":
        print("Terima kasih kerana bermain.")
        break

    else:
        print("Pilihan tidak sah.")

# data[].attributes.attachment_link.title
Cream and Brown Illustrative Food Journal Presentation

# data[].attributes.body
CANVA: https://canva.link/f4sixno3tmvnvz4

# data[].attributes.attachment_link.readable_text
import time
# ===========================
# Escape Adventure
# ===========================
key = 0
print("=" * 50)
print("ESCAPE ADVENTURE ")
print("=" * 50)
print("One day, you were walking through a HAUNTED HOUSE...")
time.sleep(2)
print("Soon as you walk in, the door close quickly and trap you inside")
time.sleep(2)
print("You saw three locked doors infront of  you")
time.sleep(2)
print("Then, you saw a letter on the floor")
time.sleep(2)
print("The letters says: Only people that can solve all five doors can escape!!")
time.sleep(3)
print("Your mission:")
time.sleep(1)
print("- Unlock all 5 doors")
time.sleep(1)
print("- Collect 5 keys")
time.sleep(1)
input("Press ENTER to begin your adventure...")

# ===========================
# ROOM 1
# ===========================
print("ROOM 1 - The Math Door")
print("What is the answer for 30+20")
print("\nA. 40")
print("B. 45")
print("C. 55")
print("D. 50")
answer = input("Your answer: ").upper()
if answer == "D":
    key += 1
    print("You found Key #1!")
elif answer in ["A", "B", "C"]:
    print("Wrong answer!")
input("\nPress ENTER to continue to Room 2...")
# ===========================
# ROOM 2
# ===========================
print("ROOM 2 - The Animal Door")
print("What is the biggest animal on earth?")
print("\nA. Whale")
print("B. Elephant")
print("C. Dog")
print("D. Ant")
answer = input("Your answer: ").upper()
if answer == "A":
    key += 1
    print("You found Key #2!")
elif answer in ["B", "C", "D"]:
    print("Wrong answer!")
input("\nPress ENTER to continue to Room 3...")
# ===========================
# ROOM 3
# ===========================
print("ROOM 3 - the riddles door")
print("I am tall when I am young, and short when I am old. What am I?")
print("\nA. Tree")
print("B. Candles")
print("C. Stick")
print("D. Tower")
answer = input("Your answer: ").upper()
if answer == "B":
    key += 1
    print("You found Key #3!")
elif answer in ["A", "C", "D"]:
    print("Wrong answer!")
input("\nPress ENTER to continue to Room 4...")
# ===========================
# ROOM 4
# ===========================
print("ROOM 4 - the general knowledge door")
print("Where do humans live on?")
print("\nA. Mars")
print("B. Earth")
print("C. Jupiter")
print("D. Saturn")
answer = input("Your answer: ").upper()
if answer == "B":
    key += 1
    print("You found Key #4!")
elif answer in ["A", "C", "D"]:
    print("Wrong answer!")
input("\nPress ENTER to continue to Room 5...")
# ===========================
# ROOM 5
# ===========================
print("ROOM 5 - the food door")
print("Which fruit is known as the king of fruits??")
print("\nA. Apple")
print("B. Watermelon")
print("C. Banana")
print("D. Durian")
answer = input("Your answer: ").upper()
if answer == "D":
    key += 1
    print("You found Key #5!")
elif answer in ["A", "B", "C"]:
    print("Wrong answer!")
input("\nPress ENTER to continue...")

        # ===========================
# ENDING
# ===========================

if key == 5:

    print("\nYou place the five golden keys into")
    print("the gate.")

    time.sleep(2)

    print("���� Key 1 inserted...")
    time.sleep(1)

    print("���� Key 2 inserted...")
    time.sleep(1)

    print("���� Key 3 inserted...")
    time.sleep(1)

    print("\nThe gate begins to shake...")

    time.sleep(2)
    print("The gate slowly opens!")

    time.sleep(2)
    print("You did it! ")

    time.sleep(2)

   
    print("        CONGRATULATIONS!")
    time.sleep(1)

    print("\nFinal Results")
    print("--------------------------")
    print("���� Keys :", key, "/5")
    time.sleep(1)
    print("\n���� You made it!")
    time.sleep(1)
    
  

print("\nThank you for playing Escape Adventure!")

# ===========================
# PLAY AGAIN
# ===========================

while True:

    again = input("\nWould you like to play again? (Y/N): ").upper()

    if again == "Y":

        print("\nPlease run the program again to start a new game.")
        break

    elif again == "N":

        print("\nGoodbye! Have a wonderful day! ����")
        break

    else:

        print("Please enter Y or N.")



# data[].attributes.body
Science Quiz

# data[].attributes.body
https://canva.link/t1a95qh95n09x2k

# data[].attributes.attachment_link.readable_text
questions = [
    {
        "question": "What is the main cause of climate change?",
        "options": [
            "A. Greenhouse gas emissions",
            "B. Moonlight",
            "C. Earthquakes",
            "D. Ocean waves"
        ],
        "answer": "A"
    },
    {
        "question": "Which gas is the biggest contributor to global warming?",
        "options": [
            "A. Oxygen",
            "B. Nitrogen",
            "C. Carbon Dioxide (CO2)",
            "D. Helium"
        ],
        "answer": "C"
    },
    {
        "question": "Which of these helps reduce climate change?",
        "options": [
            "A. Planting trees",
            "B. Burning more coal",
            "C. Wasting electricity",
            "D. Throwing rubbish into rivers"
        ],
        "answer": "A"
    },
    {
        "question": "Which energy source is renewable?",
        "options": [
            "A. Coal",
            "B. Solar energy",
            "C. Oil",
            "D. Natural gas"
        ],
        "answer": "B"
    },
    {
        "question": "What can you do to help fight climate change?",
        "options": [
            "A. Leave lights on all day",
            "B. Recycle and save energy",
            "C. Waste water",
            "D. Burn plastic"
        ],
        "answer": "B"
    }
]

score = 0

print("���� Welcome to the SDG 13: Climate Action Quiz! ����")

for q in questions:
    print("\n" + q["question"])
    for option in q["options"]:
        print(option)

    answer = input("Your answer (A/B/C/D): ").upper()

    if answer == q["answer"]:
        print("��� Correct!")
        score += 1
    else:
        print("��� Incorrect.")
        print("Correct answer:", q["answer"])

print("\nQuiz Complete!")
print("Your Score:", score, "/", len(questions))

if score == 5:
    print("Excellent! You're a Climate Action Champion! ����")
elif score >= 3:
    print("Great job! You understand the basics of climate action.")
else:
    print("Keep learning! Every small action helps protect our planet.")

# data[].attributes.body
https://canva.link/gs65p2vy2q4fy93

# data[].attributes.attachment_link.readable_text
# Math and English Quiz

score = 0

print("======================================")
print("      MATH AND ENGLISH QUIZ")
print("======================================")

print("\nInstructions:")
print("1. Answer all questions.")
print("2. Type your answer carefully.")
print("3. For multiple-choice questions, type a, b, or c.")
print("4. Each correct answer is worth 1 mark.")
print("5. Good luck!\n")

# -----------------
# Math Questions
# -----------------
print("========== Math Section ==========\n")

answer = input("1. What is 15 + 27? ")
if answer == "42":
    print("Correct!\n")
    score += 1
else:
    print("Wrong! The correct answer is 42.\n")

answer = input("2. What is 9 x 8? ")
if answer == "72":
    print("Correct!\n")
    score += 1
else:
    print("Wrong! The correct answer is 72.\n")

answer = input("3. What is 100 �� 4? ")
if answer == "25":
    print("Correct!\n")
    score += 1
else:
    print("Wrong! The correct answer is 25.\n")

# -----------------
# English Questions
# -----------------
print("======== English Section ========\n")

# Present Tense
answer = input(
    "4. Choose the correct sentence (Present Tense):\n"
    "a. She play football every day.\n"
    "b. She plays football every day.\n"
    "c. She played football every day.\n"
    "Your answer: "
).lower()

if answer == "b":
    print("Correct!\n")
    score += 1
else:
    print("Wrong! The correct answer is b.\n")

# Past Tense
answer = input(
    "5. Choose the correct Past Tense of 'go'.\n"
    "a. goes\n"
    "b. going\n"
    "c. went\n"
    "Your answer: "
).lower()

if answer == "c":
    print("Correct!\n")
    score += 1
else:
    print("Wrong! The correct answer is c.\n")

# Singular and Plural
answer = input(
    "6. Which word is plural?\n"
    "a. cat\n"
    "b. cats\n"
    "c. child\n"
    "Your answer: "
).lower()

if answer == "b":
    print("Correct!\n")
    score += 1
else:
    print("Wrong! The correct answer is b.\n")

# -----------------
# Final Score
# -----------------
print("======================================")
print("            QUIZ FINISHED")
print("======================================")
print("Your score:", score, "/ 6")

if score == 6:
    print("Excellent! Perfect score!")
elif score >= 4:
    print("Good job! You passed.")
else:
    print("Keep practicing and try again!")

print("======================================")

# data[].attributes.body
https://canva.link/gs65p2vy2q4fy93

# data[].attributes.attachment_link.readable_text
def calculate_bmi(weight, height_m):
    return weight / (height_m * height_m)

def get_bmi_category(bmi):
    if bmi < 18.5:
        return "Underweight"
    elif bmi < 25:
        return "Normal"
    elif bmi < 30:
        return "Overweight"
    else:
        return "Obese"
        
print ("Welcome to BMI calculator! Let's see how healthy you are and we will give you advice based on your results!�������� ")

# Input
name = input("Enter your name: ")
gender = input("Enter your gender (Male/Female): ")
age = int(input("Enter your age: "))
weight = float(input("Enter your weight in kg: "))
height_cm = float(input("Enter your height in cm: "))

height_m = height_cm / 100

bmi = calculate_bmi(weight, height_m)
category = get_bmi_category(bmi)

def get_health_advice(bmi):
    if bmi < 18.5:
        return "Eat more nutrient-rich foods and consider strength training."
    elif bmi < 25:
        return "Great job! Keep maintaining your healthy lifestyle."
    elif bmi < 30:
        return "Increase physical activity and improve your diet."
    else:
        return "Consider consulting a healthcare professional immediately for a safe weight plan."

print("\n===== BMI RESULT =====")
print("Name:", name)
print("Gender:", gender)
print("Age:", age)
print("Weight:", round(weight, 1), "kg")
print("Height:", round(height_cm, 1), "cm")
print("BMI:", round(bmi, 2))
print("Category:", category)
print("Health Advice:", get_health_advice(bmi))

def get_health_advice(bmi):
    if bmi < 18.5:
        print ("Eat more nutrient-rich foods and consider strength training.")
    elif bmi < 25:
        print ("Great job! Keep maintaining your healthy lifestyle.")
    elif bmi < 30:
        print ("Increase physical activity and improve your diet.")
    else:
        print ("Consider consulting a healthcare professional immediately for a safe weight plan.")

print ("------------------------------------------------------------")
print ("Time for a quiz to test yourself on how you should stay healthy! ��������")
print ("Answer the questions by typing in A, B, C or D.")
print ("------------------------------------------------------------")

score = 0

# Question 1
print ("1. What should you include more in your meals?")
print ("A. Red meat")
print ("B. Oils and fats")
print ("C. Green vegetables")
print ("D. Nuts")

answer = input ("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is C.")

print ("------------------------------------------------------------")

# Question 2
print ("2. How many glasses of water we should drink a day?")
print ("A. 8 glasses")
print ("B. 3 glasses")
print ("C. 6 glasses")
print ("D. 13 glasses")

answer = input ("Your answer: ").upper()

if answer == "A":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is A.")

print ("------------------------------------------------------------")

# Question 3
print ("3. How many hours of sleep is only enough for teenagers?")
print ("A. Stay up late instead")
print ("B. 12 hours")
print ("C. 6 hours")
print ("D. 8 hours")

answer = input ("Your answer: ").upper()

if answer == "D":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is D.")

print ("------------------------------------------------------------")

# Question 4
print ("4. What should we do every 6 months?")
print ("A. Eat excessive sugary foods")
print ("B. Go to a hospital/clinic for a full body check-up")
print ("C. Hit the gym")
print ("D. Be a couch potato for a whole day")

answer = input ("Your answer: ").upper()

if answer == "B":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is B.")

print ("------------------------------------------------------------")

# Question 5
print ("5. What shouldn't we do when trying to stay healthy?")
print ("A. Exercise every week for 30 minutes")
print ("B. Plan a great diet plan")
print ("C. Try smoking")
print ("D. Go to sleep early and wake up early")

answer = input ("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is C.")

print ("------------------------------------------------------------")

if score == 5:
    print ("Amazing job! You're well educated on how to stay healthy.")

if score == 4:
    print ("Not bad! You have a sense on how to stay healthy.")

if score == 3:
    print ("Don't worry! Try answering the quiz again.")

if score == 2:
    print ("Don't worry! Try answering the quiz again.")

if score == 1:
    print ("Don't worry! Try answering the quiz again.")

# data[].attributes.body
https://youtu.be/5pIN6b13KkU

https://canva.link/7nt7roofcemv9o7

# data[].attributes.attachment_link.readable_text
"""
Health Quiz + Stress Management Assistant
-------------------------------------------
Part 1: A 4-question multiple-choice lifestyle/health quiz.
Part 2: A short "Health Trivia" mini-game (a fun break from work,
        with correct/incorrect feedback and a final score).c
Part 3: A stress management assistant that lets the user pick their
        mood from 5 options and rate their day.
"""

import datetime


# ----------------------------------------------------------------
# PART 1: HEALTH QUIZ
# ----------------------------------------------------------------

def ask_question(question, choices):
    """Ask a single multiple-choice question and return the chosen letter."""
    print("\n" + question)
    for letter, choice in choices.items():
        print(f"  {letter}) {choice}")

    valid_options = [c.lower() for c in choices.keys()]
    while True:
        answer = input("Your answer: ").strip().lower()
        if answer in valid_options:
            return answer
        print(f"Please choose one of: {', '.join(choices.keys())}")


def run_health_quiz():
    print("=" * 50)
    print("           HEALTH QUIZ")
    print("=" * 50)

    questions = [
        {
            "question": "1. How many hours of sleep do you usually get per night?",
            "choices": {
                "a": "Less than 5 hours",
                "b": "5-6 hours",
                "c": "7-8 hours",
                "d": "More than 8 hours",
            },
        },
        {
            "question": "2. How many days per week do you exercise (30+ minutes)?",
            "choices": {
                "a": "0 days",
                "b": "1-2 days",
                "c": "3-4 days",
                "d": "5 or more days",
            },
        },
        {
            "question": "3. How would you describe your typical diet?",
            "choices": {
                "a": "Mostly fast food / processed food",
                "b": "A mix of healthy and unhealthy meals",
                "c": "Mostly home-cooked, balanced meals",
                "d": "Strict, well-planned nutrition",
            },
        },
        {
            "question": "4. How many glasses of water do you drink per day?",
            "choices": {
                "a": "Less than 2 glasses",
                "b": "3-4 glasses",
                "c": "5-7 glasses",
                "d": "8 or more glasses",
            },
        },
    ]

    answers = {}
    for q in questions:
        ans = ask_question(q["question"], q["choices"])
        answers[q["question"]] = q["choices"][ans]

    print("\n" + "-" * 50)
    print("Quiz Summary:")
    for question, chosen in answers.items():
        print(f"- {question}\n  -> {chosen}")

    return answers


# ----------------------------------------------------------------
# PART 2: HEALTH TRIVIA MINI-GAME
# ----------------------------------------------------------------

def ask_trivia_question(question, choices, correct_letter):
    """Ask a trivia question, reveal if the answer was correct, return True/False."""
    print("\n" + question)
    for letter, choice in choices.items():
        print(f"  {letter}) {choice}")

    valid_options = [c.lower() for c in choices.keys()]
    while True:
        answer = input("Your answer: ").strip().lower()
        if answer in valid_options:
            break
        print(f"Please choose one of: {', '.join(choices.keys())}")

    if answer == correct_letter:
        print("Correct! ����")
        return True
    else:
        print(f"Not quite. The correct answer was '{correct_letter}) "
              f"{choices[correct_letter]}'.")
        return False


def run_health_trivia():
    print("\n" + "=" * 50)
    print("     HEALTH TRIVIA - QUICK BRAIN BREAK!")
    print("=" * 50)
    print("Take a short breather with this quick health trivia game.\n")

    trivia_questions = [
        {
            "question": "1. How many hours of sleep are generally recommended "
                        "for adults each night?",
            "choices": {
                "a": "3-4 hours",
                "b": "5-6 hours",
                "c": "7-9 hours",
                "d": "10-12 hours",
            },
            "correct": "c",
        },
        {
            "question": "2. Which nutrient is the body's main source of quick energy?",
            "choices": {
                "a": "Carbohydrates",
                "b": "Vitamins",
                "c": "Minerals",
                "d": "Fiber",
            },
            "correct": "a",
        },
        {
            "question": "3. About how many glasses of water are commonly "
                        "recommended per day?",
            "choices": {
                "a": "1-2 glasses",
                "b": "3-4 glasses",
                "c": "8 glasses",
                "d": "15 glasses",
            },
            "correct": "c",
        },
        {
            "question": "4. Which of these is a good way to relieve stress?",
            "choices": {
                "a": "Deep breathing exercises",
                "b": "Skipping meals",
                "c": "Staying up all night",
                "d": "Ignoring how you feel",
            },
            "correct": "a",
        },
        {
            "question": "5. How many minutes of moderate exercise per week "
                        "are commonly recommended for adults?",
            "choices": {
                "a": "10 minutes",
                "b": "30 minutes",
                "c": "150 minutes",
                "d": "500 minutes",
            },
            "correct": "c",
        },
    ]

    score = 0
    for q in trivia_questions:
        if ask_trivia_question(q["question"], q["choices"], q["correct"]):
            score += 1

    total = len(trivia_questions)
    print("\n" + "-" * 50)
    print(f"Trivia complete! You scored {score}/{total}.")

    if score == total:
        print("Perfect score! You're a health expert. ����")
    elif score >= total * 0.6:
        print("Nice work! You know your health basics well.")
    else:
        print("Good effort! Every round is a chance to learn something new.")

    return score


# ----------------------------------------------------------------
# PART 3: STRESS MANAGEMENT ASSISTANT
# ----------------------------------------------------------------

def run_stress_assistant():
    print("\n" + "=" * 50)
    print("       STRESS MANAGEMENT ASSISTANT")
    print("=" * 50)

    today = datetime.date.today().strftime("%A, %B %d, %Y")
    print(f"\nToday is {today}. Let's check in on how you're doing.\n")

    # Question 1: Mood selection (5 options)
    mood_options = {
        "a": "Happy",
        "b": "Excited",
        "c": "Okay",
        "d": "Stressed",
        "e": "Sad / Angry",
    }
    ans = ask_question("1. Which best describes how you're feeling today?", mood_options)
    feeling = mood_options[ans]

    # Question 2: Rate the day
    while True:
        rating_input = input(
            "\n2. On a scale of 1-10, how would you rate your day overall? "
        ).strip()
        if rating_input.isdigit() and 1 <= int(rating_input) <= 10:
            rating = int(rating_input)
            break
        print("Please enter a whole number between 1 and 10.")

    # Supportive feedback based on selected mood
    mood_messages = {
        "Happy": "That's wonderful to hear! Try to hold onto what made today good.",
        "Excited": "Great energy! Channel it into something productive or fun.",
        "Okay": "An 'okay' day is still a day you got through. That counts for something.",
        "Stressed": "That sounds heavy. A few minutes of deep breathing or a short "
                    "walk can help take the edge off.",
        "Sad / Angry": "It's okay to feel this way. Consider talking to someone you "
                       "trust, or taking a quiet moment just for yourself.",
    }
    message = mood_messages.get(feeling, "Thanks for checking in with yourself today.")

    print("\n" + "-" * 50)
    print("Check-in Summary:")
    print(f"- Mood: {feeling}")
    print(f"- Day rating: {rating}/10")
    print(f"\n{message}")

    return {"feeling": feeling, "rating": rating}


# ----------------------------------------------------------------
# MAIN PROGRAM
# ----------------------------------------------------------------

def main():
    quiz_answers = run_health_quiz()
    trivia_score = run_health_trivia()
    checkin = run_stress_assistant()

    print("\n" + "=" * 50)
    print("Thanks for completing the health quiz, trivia game, and check-in!")
    print("=" * 50)


if __name__ == "__main__":
    main()

# data[].attributes.body
canva :https://canva.link/unoho50o1y3bztn

youtube :https://youtu.be/gjWNu7rprnc?si=eznvgpsbGTW6WIKy

# data[].attributes.attachment_link.readable_text
skor = 0

def matematik():
    global skor
    print("Selamat Datang Ke Dunia Matematik !!!!")
    ans = input("Berapakah 20 + 20 + 20 +7? ")
    if ans == "67":
        print("Betul!! Bagus!!!!")
        skor += 10
    else:
        print("Jawapan anda salah. ")

def sains():
    global skor
    print("Selamat Datang Ke Dunia Sains !!!!")
    ans = input("Planet yang merupakan tempat tinggal manusia. ")
    if ans.lower() == "bumi":
        print("Betul! Pandaiiii !!!")
        skor += 10
    else:
        print("Jawapan anda salah.")

def inggeris():
    global skor
    print("Selamat Datang Ke Dunia Bahasa Inggeris !!!!")
    ans = input("Apakah sinonim bagi 'mistake' ? ")
    if ans.lower() == "error":
        print("Betul! Niceeeee !!!")
        skor += 10
    else:
        print("Jawapan anda salah.")

print("--------------------------------------")
print("      KNOWLEDGE QUEST")
print("--------------------------------------")
print("Selamat datang ke pengembaraan ilmu!")

matematik()
sains()
inggeris()

print("Jumlah Skor:", skor)

if skor == 30:
    print("Tahniah! Anda berjaya ialah Knowledge Quest Master !!!!")
else:
    print("Jangan berputus asa !! Cuba lagi untuk mendapat markah penuh!")

# data[].attributes.body
CANVA LINK:

https://canva.link/dbtoj6ladw0sz1j

YOUTUBE LINK:

https://youtu.be/qrg14VZ78AQ

# data[].attributes.attachment_link.readable_text
name = input("Type your name")
print("Welcome",name,"to this game!")
print("My topic is Sustainable Development Goal 4 (SDG 4): Quality Education.")
print("I will give you some question about SDG 4 and you need to answer correctly.")

answer = input("Welcome to my Science Quiz Game! ���: .���. o(���������)o .���.:���. Are you ready!!!!!")

if answer == "yes":
    print("Great! q(���������q)")


print("Answer the questions by typing A, B, C, or D.")
print("-----------------------------------")


score = 0


# Question 1
print("1. What is the example of SOLID? ")
print("A. WATER")
print("B. BOOK")
print("C. ORANGE JUICE")
print("D. GAS")


answer = input("Your answer: ")  .upper()


if answer == "B":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG! The correct answer is B. BOOK")
    
    
print("-----------------------------------")


# Question 2
print("2. What is the process of plants making their own food?")
print("A. TRANSPIRATION")
print("B. DECOMPOSITION")
print("C. PHOTOSYNTHESIS")
print("D. RESPIRATION")


answer = input("Your answer: "). upper()


if answer == "C":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG! The correct answer is C. PHOTOSYNTHESIS")
    
    
print("-----------------------------------")


# Question 3
print("3. What is the example of herbivores?")
print("A. TIGER")
print("B. RABBIT")
print("C. SHARK")
print("D. CAT")


answer = input("Your answer: "). upper()


if answer == "B":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG! The correct answer is B. RABBIT")
    
    
print("-----------------------------------")


# Question 4
print("4. Name an animals that lays egg.")
print("A. TIGER")
print("B. PANDA")
print("C. DOLPHIN")
print("D. SNAKE")


answer = input("Your answer: "). upper()


if answer == "D":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG! The correct answer is D. SNAKE")
    
    
    
print("-----------------------------------")


# Question 5
print("5. What is the name of the gas that we breathe in from the air?")
print("A. CARBON DIOXIDE")
print("B. NITROGEN")
print("C. CARBON OXYGEN")
print("D. OXYGEN")


answer = input("Your answer: "). upper()


if answer == "D":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG! The correct answer is D. OXYGEN")
    
    
print("-----------------------------------")


# Question 6
print("6. Which term describes the process of a gas changing directly into a solid without first becoming a liquid?")
print("A. DEPOSITION")
print("B. SUBLIATION")
print("C. CONDENSATION")
print("D. EVAPORATION")


answer = input("Your answer: "). upper()


if answer == "A":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG~ The correct answer is A. DEPOSITION")
    
    
print("-----------------------------------")


# Question 7
print("7. Which gas makes up the largest percentage (approximately 78%) of the Earth's atmosphere?")
print("A. CARBON DIOXIDE")
print("B. NITROGEN")
print("C. CARBON OXYGEN")
print("D. OXYGEN")


answer = input("Your answer: "). upper()


if answer == "B":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG~ The correct answer is B. NITROGEN")
    
    
print("-----------------------------------")


# Question 8
print("8. Which component of air do plants require to perform photosynthesis?")
print("A. CARBON DIOXIDE")
print("B. NITROGEN")
print("C. CARBON OXYGEN")
print("D. OXYGEN")


answer = input("Your answer: "). upper()


if answer == "A":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG~ The correct answer is A. CARBON DIOXIDE")
    
    
print("-----------------------------------")


# Question 9
print("9. Which state of matter has particles that are close together but arranged randomly, allowing them to slide past one another??")
print("A. Solid")
print("B. Liquid")
print("C. Gas")
print("D. Plasma")


answer = input("Your answer: "). upper()


if answer == "B":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG~ The correct answer is B. Liquid")
    
    
print("-----------------------------------")


# Question 10
print("10. When wet clothes dry in the sun, water changes from a liquid to a gas. What is this process called?")
print("A. Freezing")
print("B. Melting")
print("C. Evaporation")
print("D. Condensation")


answer = input("Your answer: "). upper()


if answer == "C":
    print("CORRECT!")
    score = score + 1
else:
    print("WRONG~ The correct answer is C. Evaporation")
    
    
print("-----------------------------------")


print("Quiz finished!")
print("Your final score is:", score, "out of 10")

if score == 10:
    print("EXCELLENT!~\(���������)/~ YOU ARE SO GOOD IN SCIENCE")
elif score >= 6:
    print("GOOD JOB!o(^���^)o KEEP IT UP!")
else:
    print("NICE TRY!\(���������*\)) STUDY HARDER!")

# data[].attributes.body
https://canva.link/86fwyvojzlqpnni

# data[].attributes.attachment_link.readable_text
# KOI FISH QUIZ (20 QUESTIONS)

score = 0

questions = [
    ("1. Where did Koi fish originate?", ["A. China", "B. Japan", "C. Korea", "D. Thailand"], "B"),
    ("2. Koi fish are a type of?", ["A. Salmon", "B. Tuna", "C. Carp", "D. Goldfish"], "C"),
    ("3. Koi fish live in?", ["A. Saltwater", "B. Freshwater", "C. Both", "D. None"], "B"),
    ("4. What do Koi fish eat?", ["A. Meat only", "B. Plants only", "C. Omnivores", "D. Insects only"], "C"),
    ("5. Which season are Koi fish most active?", ["A. Winter", "B. Summer", "C. Spring", "D. Autumn"], "B"),
    ("6. Koi fish breathe using?", ["A. Lungs", "B. Skin", "C. Gills", "D. Fins"], "C"),
    ("7. What is the average lifespan of Koi fish?", ["A. 5 years", "B. 10 years", "C. 25-50 years", "D. 100 years"], "C"),
    ("8. Which color is common in Koi fish?", ["A. Red", "B. White", "C. Black", "D. All of the above"], "D"),
    ("9. Koi fish are commonly kept in?", ["A. Aquariums only", "B. Ponds", "C. Oceans", "D. Rivers only"], "B"),
    ("10. Koi fish symbolize?", ["A. Luck and perseverance", "B. Danger", "C. Fear", "D. Anger"], "A"),
    ("11. Koi fish need clean?", ["A. Air", "B. Freshwater", "C. Sand", "D. Salt"], "B"),
    ("12. Which sense helps Koi fish find food?", ["A. Smell", "B. Hearing", "C. Touch", "D. Taste"], "A"),
    ("13. Koi fish are most active during?", ["A. Daytime", "B. Night only", "C. Midnight", "D. Dawn only"], "A"),
    ("14. Baby Koi fish are called?", ["A. Fry", "B. Cub", "C. Pup", "D. Chick"], "A"),
    ("15. Which is a popular Koi variety?", ["A. Kohaku", "B. Guppy", "C. Betta", "D. Oscar"], "A"),
    ("16. Koi fish should be fed?", ["A. Rocks", "B. Fish food", "C. Candy", "D. Bread only"], "B"),
    ("17. Koi fish can grow up to about?", ["A. 10 cm", "B. 30 cm", "C. 90 cm", "D. 2 meters"], "C"),
    ("18. Healthy Koi pond water should have?", ["A. Good filtration", "B. Oil", "C. Soap", "D. Juice"], "A"),
    ("19. Koi fish are popular because they are?", ["A. Colorful", "B. Aggressive", "C. Tiny", "D. Poisonous"], "A"),
    ("20. Koi fish are mainly raised for?", ["A. Food", "B. Decoration and pets", "C. Racing", "D. Hunting"], "B")
]

print("=" * 50)
print("         KOI FISH QUIZ (20 QUESTIONS)")
print("=" * 50)

for question, options, correct in questions:
    print("\n" + question)

    for option in options:
        print(option)

    answer = input("Enter your answer (A/B/C/D): ").strip().upper()

    if answer == correct:
        print("Correct!")
        score = score + 1
    else:
        print("Wrong! The correct answer is", correct)

print("\n" + "=" * 50)
print("               QUIZ RESULTS")
print("=" * 50)

print("Your Score:", score, "/20")

percentage = (score / 20) * 100
print("Percentage:", round(percentage, 1), "%")

if percentage >= 90:
    print("Excellent! You are a Koi Fish Expert!")
elif percentage >= 75:
    print("Very Good! You know a lot about Koi fish.")
elif percentage >= 50:
    print("Good! Keep learning about Koi fish.")
else:
    print("You need more practice. Try again!")

print("\nThank you for taking the Koi Fish Quiz!")

# data[].attributes.body
https://drive.google.com/file/d/1zevw3bzjzC4hGpXMDGqLfatHacYRlEX8/view?usp=drive_link

# data[].attributes.attachment_link.readable_text
import random
# Display the game title 
print("=====================================")
print("Welcome to the Treasure Hunt Game!")
print("=====================================")
print("Find the hidden treasure!")
print("But to get the chance to guess the location, you must answer a question correctly.")
print("If you answer incorrectly, you will lose a life.")
print("You have 3 lives. Good luck!")
# Question 1
questions = [
    {
        "1": "What is the capital city of Malaysia?",
        "A": "Ipoh",
        "B": "Penang",
        "C": "Kuala Lumpur"
    }
]
for q in questions:
    print(q["1"])
    answer = input("Your answer: ").upper()
if answer == "C":
       print("Correct! You may now guess the location of the treasure.")

else:
        print("Wrong! The correct answer is C: Kuala Lumpur. You lose a life.")
        print("Question 2:What is the largest planet in our solar system?")
        print("A: Earth")    
        print("B: Jupiter")
        print("C: Saturn")

        answer = input("Your answer: ").upper()

        if answer == "B":
         print("Correct! You may now guess the location of the treasure.")
        else:
          print("Wrong! The correct answer is B: Jupiter. You lose a life.")
          print("Question 3: What is the chemical symbol for gold?")
          print("A: Au")
          print("B: Ag")
          print("C: Fe")

        answer = input("Your answer: ").upper()

        if answer == "A":
          print("Correct! You may now guess the location of the treasure.")
        else:
          print("Wrong! The correct answer is A: Au. You died,try again next time.")
          print("Game Over!")

print("Choose a number between 1 to 5 to guess the location of the treasure.")   
print()

# Randomly choose the treasure location
treasure = random.randint(1, 5)

# Ask the player to guess the location of the treasure
guess = int(input("Enter your guess (1-5): "))

#Check if the guess is correct
if guess == treasure:
    print("Congratulations! You found the treasure!")
else:
    print("Sorry,you did not find the treasure.")
    print(f"The treasure was hidden at location {treasure}. Better luck next time!")

print("Thank you for playing the Treasure Hunt Game!")
    

# data[].attributes.body
youtube：

https://youtu.be/rucRjpkmAEs

canva：

https://canva.link/jp94n313ksbbnhe

# data[].attributes.attachment_link.readable_text
# PERMAINAN PENGEMBARAAN PEMBELAJARAN BAHASA

score = 0

def menu():
    print("\n==============================")
    print(" PERMAINAN PENGEMBARAAN")
    print(" PEMBELAJARAN BAHASA")
    print("==============================")
    print("1. Mula Permainan")
    print("2. Keluar")

def permainan():
    global score

    print("\nSelamat Datang!")
    print("Anda perlu menjawab soalan dengan betul.")

    soalan = [
        {
            "perkataan": "Apple",
            "jawapan": "epal"
        },
        {
            "perkataan": "Book",
            "jawapan": "buku"
        },
        {
            "perkataan": "School",
            "jawapan": "sekolah"
        },
        {
            "perkataan": "Cat",
            "jawapan": "kucing"
        },
        {
            "perkataan": "Water",
            "jawapan": "air"
        }
    ]

    for item in soalan:
        print("\nApakah maksud perkataan:")
        print(item["perkataan"])

        jawapan = input("Jawapan: ").lower()

        if jawapan == item["jawapan"]:
            print("Betul!")
            score += 10
        else:
            print("Salah.")
            print("Jawapan yang betul ialah:", item["jawapan"])

    print("\nPermainan Tamat!")
    print("Markah anda:", score)

while True:
    menu()
    pilihan = input("Pilih: ")

    if pilihan == "1":
        permainan()

    elif pilihan == "2":
        print("Terima kasih kerana bermain.")
        break

    else:
        print("Pilihan tidak sah.")

# data[].attributes.attachment_link.title
# PERMAINAN PENGEMBARAAN PEMBELAJARAN BA

# data[].attributes.body
Canva Link:

https://canva.link/ssge2q718phxcyq

Youtube:

https://youtu.be/RQ7_DuntbMc

# data[].attributes.attachment_link.readable_text
name = input("Type your name")
print("Welcome",name,"to this game!")
print("My topic is Sustainable Development Goal 4 (SDG 4): Quality Education.")
print("I will give you some question about SDG 4 and you need to answer correctly.")

answer = input("Welcome to answer my question ���: .���. o(���������)o .���.:���. Are you ready!!!!!")

if answer == "yes":
    print("Great! q(���������q)")

print("Answer the questions by typingA,B,C or D.")
print("-------------------------------------------")

score = 0

# Question 1
print("1. What can you do to help SDG 4?")
print("A. Help others learn")
print("B. Waste books")
print("C. Skip school every day")
print("D. Break school rules")

answer = input("Your answer: ").upper()

if answer == "A":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is A. Help others learn")
print("-------------------------------------------")    

# Question 2
print("2. Which action supports quality education?")
print("A. Throw books away")
print("B. Stop children from learning")
print("C. Donate books to students")
print("D.Ignore education")

answer = input("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is C. Donate books to students ")
print("-------------------------------------------")   

# Question 3
print("3.How can students help SDG 4?")
print("A.Cheat in exams")
print("B.Study hard and help classmates")
print("C.Bully classmates")
print("D.Miss school often")

answer = input("Your answer: ").upper()

if answer == "B":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is .Study hard and help classmates")
print("-------------------------------------------")   

# Question 4
print("4.What can adults do to support SDG 4?")
print("A.Volunteer to teach or tutor")
print("B.Prevent children from going to school")
print("C.Prevent children from going to school")
print("D.Discourage learning")

answer = input("Your answer: ").upper()

if answer == "A":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is A.Volunteer to teach or tutor")
print("-------------------------------------------") 

# Question 5
print("5.Which of these is a good way to promote education?")
print("A.Keep books only for yourself")
print("B.Waste school resources")
print("C.Tell people not to study")
print("D.Share learning materials with others")

answer = input("Your answer: ").upper()

if answer == "D":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The correct answer is D.Share learning materials with others")
print("-------------------------------------------") 

print("Quiz finished!")
print("Your final score is:", score, "out of 5")

if score == 5:
    print("That���s incredible! You���re the best!(��������`���)")
elif score >= 3:
    print("Great job! Keep it up!���_���")
else:
    print("Not a bad try!`(>���<)���")

# data[].attributes.body
Canva:

https://canva.link/m46nzynamgm5qrn

Youtube:

https://youtu.be/BY7RMOGTw7E?si=55XM83FXEfZ2Powh

# data[].attributes.attachment_link.readable_text

print("Welcome to the  Animal Guessing Game!")
print("Answer the questions by typing A, B, C, or D.")
print("-----------------------------------")

score = 0

# Question 1
print("1. I am the king of the jungle and I love meat! What animal is this?")
print("A. Dog")
print("B. Horse")
print("C. Tiger")
print("D. Elephant")

answer = input("Your answer: ").upper()

if answer == "C":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is C. Tiger")
  
print("-----------------------------------")

# Question 2
print("2. I am a bird and I can speak! What animal is this?")
print("A. Cat")
print("B. Cockroach")
print("C. Wolf")
print("D. Parrot")

answer = input("Your answer: ").upper()

if answer == "D":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is D. Parrot")
  
print("-----------------------------------")

# Question 3
print("3. I live at the savannah and I have black and white stripes. What animal is this?")
print("A. Zebra")
print("B. Snake")
print("C. Spider")
print("D. Bird")

answer = input("Your answer: ").upper()

if answer == "A":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is A. Zebra")
  
print("-----------------------------------")

# Question 4
print("4. I am an insect and i collect honey! What animal is this?")
print("A. Butterfly")
print("B. Fox")
print("C. Bee")
print("D. Moose")

answer = input("Your answer: ").upper()

if answer == "C":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is C. Bee")
  
print("-----------------------------------")

# Question 5
print("5. I am venomous and i had no legs. What animal is this?")
print("A. Goose")
print("B. Snake")
print("C. Fish")
print("D. Deer")

answer = input("Your answer: ").upper()

if answer == "B":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is B. Snake")
  
print("-----------------------------------")

# Question 6
print("6. I live at farm and I produce milk. What animal is this?")
print("A. Duck")
print("B. Chicken")
print("C. Cow")
print("D. Pig")

answer = input("Your answer: ").upper()

if answer == "C":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is C. Cow")
  
print("-----------------------------------")

# Question 7
print("7. I live in the water and I am an mammal that got fins. What animal is this?")
print("A. Dolphin")
print("B. Goldfish")
print("C. Frog")
print("D. Fish")

answer = input("Your answer: ").upper()

if answer == "A":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is A. Dolphin")
  
print("-----------------------------------")

# Question 8
print("8. I am a reptile and I have a long tail. What animal is this?")
print("A. Dog")
print("B. Turtle")
print("C. Mouse")
print("D. Lizard")

answer = input("Your answer: ").upper()

if answer == "D":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is D. Lizard")
  
print("-----------------------------------")

# Question 9
print("9. I live in trees like to climb and I eat bananas. What animal is this?")
print("A. Bird")
print("B. Bear")
print("C. Monkey")
print("D. Squirrel")

answer = input("Your answer: ").upper()

if answer == "C":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is C. Monkey")
  
print("-----------------------------------")

# Question 10
print("10. I live on land and I have a long neck. What animal is this?")
print("A. Giraffe")
print("B. Lion")
print("C. Buffalo")
print("D. Elephant")

answer = input("Your answer: ").upper()

if answer == "A":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is A. Giraffe")
  
print("-----------------------------------")


print("Quiz finished!")
print("Your final score is:", score, "out of 10")

if score == 10:
  print("Excellent! You are truly a zoologist!")
elif score >= 5:
  print("Well done! Try harder")
else:
  print("You fail! Go back and study better!")
    

# data[].attributes.body
canva

https://canva.link/6vq3no68z8z6bk2

# data[].attributes.attachment_link.description
Get access to files anywhere through secure cloud storage and file backup for your photos, videos, files and more with Google Drive.

# data[].attributes.body
youtube link: https://youtu.be/nYNZlHGCDc0

canva link: https://canva.link/s4rov60dyypd7i

# data[].attributes.attachment_link.readable_text
import pygame
import random
import math

# Initialize pygame
pygame.init()

# Screen settings (Smaller map for Trinket and tighter gameplay)
WIDTH, HEIGHT = 640, 480
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Forest Animal Search Game - Deluxe Version")

# Colors
GREEN = (40, 150, 60)
DARK_GREEN = (25, 90, 40)
LIGHT_GREEN = (60, 180, 80)
SHADOW = (15, 60, 25)
BROWN = (110, 55, 15)
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
BLUE = (40, 110, 240)
LIGHT_BLUE = (120, 180, 255)
CYAN = (0, 255, 255)
YELLOW = (255, 220, 50)
ORANGE = (255, 120, 0)
RED = (240, 40, 40)
DARK_RED = (140, 15, 15)

# Fonts
font = pygame.font.Font(None, 24)
bold_font = pygame.font.Font(None, 26)
big_font = pygame.font.Font(None, 56)

# Clock
clock = pygame.time.Clock()
FPS = 60

# Player settings
player_size = 32
player_x = WIDTH // 2
player_y = HEIGHT // 2
player_speed = 4
lives = 3
score = 0

# Visual Effect: Trail particles for player
player_trail = []

# Shield settings
shield_duration = 10 * 1000  
shield_timer = 0  

# Game Mechanics
BASE_ENEMY_SPEED = 1.8
current_enemy_speed = BASE_ENEMY_SPEED

# Friendly animals
friendly_size = 24
friendly_animals = []

# Ferocious animals
enemy_size = 32
enemies = []

# Decorative environment features
trees = []
for _ in range(12):
    trees.append((random.randint(40, WIDTH - 40), random.randint(60, HEIGHT - 40)))

grass_tufts = []
for _ in range(30):
    grass_tufts.append((random.randint(10, WIDTH - 10), random.randint(50, HEIGHT - 10)))

def spawn_friendly():
    x = random.randint(20, WIDTH - 20)
    y = random.randint(60, HEIGHT - 20)
    friendly_animals.append(pygame.Rect(x, y, friendly_size, friendly_size))

def spawn_enemy():
    x = random.randint(20, WIDTH - 20)
    y = random.randint(60, HEIGHT - 20)
    while math.hypot(x - WIDTH//2, y - HEIGHT//2) < 120:
        x = random.randint(20, WIDTH - 20)
        y = random.randint(60, HEIGHT - 20)
    enemies.append(pygame.Rect(x, y, enemy_size, enemy_size))

def reset_enemy_positions():
    for enemy in enemies:
        x = random.randint(20, WIDTH - 20)
        y = random.randint(60, HEIGHT - 20)
        while math.hypot(x - WIDTH//2, y - HEIGHT//2) < 150:
            x = random.randint(20, WIDTH - 20)
            y = random.randint(60, HEIGHT - 20)
        enemy.x = x
        enemy.y = y

def draw_forest():
    screen.fill(GREEN)
    
    # Draw grass tufts
    for gx, gy in grass_tufts:
        pygame.draw.line(screen, LIGHT_GREEN, (gx, gy), (gx - 3, gy - 6), 2)
        pygame.draw.line(screen, LIGHT_GREEN, (gx, gy), (gx + 3, gy - 6), 2)
        pygame.draw.line(screen, LIGHT_GREEN, (gx, gy), (gx, gy - 8), 2)

    # Draw Trees with layered depths
    for tx, ty in trees:
        # Ground Shadow
        pygame.draw.ellipse(screen, SHADOW, (tx - 22, ty + 10, 44, 12))
        # Trunk
        pygame.draw.rect(screen, BROWN, (tx - 5, ty + 2, 10, 16))
        # Layered Foliage (Bottom to top)
        pygame.draw.circle(screen, DARK_GREEN, (tx, ty - 2), 20)
        pygame.draw.circle(screen, GREEN, (tx, ty - 8), 16)
        pygame.draw.circle(screen, LIGHT_GREEN, (tx - 3, ty - 12), 11)

def move_enemies():
    global lives, player_x, player_y
    player_center_x = player_x + player_size // 2
    player_center_y = player_y + player_size // 2

    for enemy in enemies:
        enemy_center_x = enemy.x + enemy_size // 2
        enemy_center_y = enemy.y + enemy_size // 2

        dx = player_center_x - enemy_center_x
        dy = player_center_y - enemy_center_y
        distance = math.hypot(dx, dy)

        if distance < 200 and distance != 0:
            enemy.x += int(current_enemy_speed * dx / distance)
            enemy.y += int(current_enemy_speed * dy / distance)
        else:
            enemy.x += random.randint(-1, 1)
            enemy.y += random.randint(-1, 1)

    # Separation logic
    for i in range(len(enemies)):
        for j in range(len(enemies)):
            if i != j:
                ent1 = enemies[i]
                ent2 = enemies[j]
                dist = math.hypot((ent1.x - ent2.x), (ent1.y - ent2.y))
                min_dist = enemy_size - 2
                if dist < min_dist and dist > 0:
                    ent1.x += int(((ent1.x - ent2.x) / dist) * 1.5)
                    ent1.y += int(((ent1.y - ent2.y) / dist) * 1.5)

    for enemy in enemies:
        enemy.x = max(0, min(WIDTH - enemy_size, enemy.x))
        enemy.y = max(0, min(HEIGHT - enemy_size, enemy.y))

def check_collisions(player_rect, current_time):
    global score, lives, player_x, player_y, current_enemy_speed, shield_timer

    for animal in friendly_animals[:]:
        if player_rect.colliderect(animal):
            friendly_animals.remove(animal)
            score += 1
            current_enemy_speed = BASE_ENEMY_SPEED + (score * 0.12)
            if score % 3 == 0:
                spawn_enemy()
            spawn_friendly()

    if current_time > shield_timer:
        for enemy in enemies:
            if player_rect.colliderect(enemy):
                lives -= 1
                player_x = WIDTH // 2
                player_y = HEIGHT // 2
                reset_enemy_positions()
                shield_timer = current_time + shield_duration
                pygame.time.delay(300)
                break

def draw_objects(player_rect, current_time):
    # Draw Player Trail
    for trail in player_trail:
        pygame.draw.rect(screen, (30, 80, 200), (trail[0], trail[1], player_size, player_size), 2)
    
    # Player Shadow & Body
    pygame.draw.ellipse(screen, SHADOW, (player_rect.x, player_rect.bottom - 4, player_size, 8))
    pygame.draw.rect(screen, BLUE, player_rect, 0, 6) # Rounded corners
    pygame.draw.rect(screen, LIGHT_BLUE, (player_rect.x + 4, player_rect.y + 4, player_size - 8, player_size - 8), 0, 4)
    # Visual core
    pygame.draw.circle(screen, WHITE, player_rect.center, player_size // 5)
    
    # Shield Effect
    if current_time < shield_timer:
        pulse = int(math.sin(current_time * 0.01) * 3)
        pygame.draw.circle(screen, CYAN, player_rect.center, player_size // 2 + 8 + pulse, 2)

    # Friendly Animals
    for animal in friendly_animals:
        cx, cy = animal.centerx, animal.centery
        r = friendly_size // 2
        # Shadow
        pygame.draw.ellipse(screen, SHADOW, (animal.x, animal.bottom - 3, friendly_size, 6))
        # Body
        pygame.draw.circle(screen, ORANGE, (cx, cy), r)
        pygame.draw.circle(screen, YELLOW, (cx, cy), r - 4)
        # Ears
        pygame.draw.circle(screen, ORANGE, (animal.x + 4, animal.y + 2), 5)
        pygame.draw.circle(screen, ORANGE, (animal.right - 4, animal.y + 2), 5)
        # Face details
        pygame.draw.circle(screen, BLACK, (cx - 4, cy - 1), 2)
        pygame.draw.circle(screen, BLACK, (cx + 4, cy - 1), 2)

    # Enemies
    pulse_offset = math.sin(current_time * 0.007) * 2
    for enemy in enemies:
        # Angry Aura Glow
        pygame.draw.rect(screen, (255, 100, 100), (enemy.x - 2, enemy.y - 2, enemy_size + 4, enemy_size + 4), 1, 4)
        # Shadow
        pygame.draw.ellipse(screen, SHADOW, (enemy.x, enemy.bottom - 2, enemy_size, 6))
        # Base Body
        pygame.draw.rect(screen, DARK_RED, enemy, 0, 4)
        
        # Inner shifting design based on pulse
        inner = pygame.Rect(enemy.x + 4, enemy.y + 4, enemy_size - 8, enemy_size - 8)
        pygame.draw.rect(screen, RED, inner, 0, 2)
        
        # Glowing Eyes
        eye_y_adj = int(pulse_offset)
        pygame.draw.circle(screen, YELLOW, (enemy.x + 9, enemy.y + 12 + eye_y_adj), 3)
        pygame.draw.circle(screen, RED, (enemy.x + 9, enemy.y + 12 + eye_y_adj), 1)
        pygame.draw.circle(screen, YELLOW, (enemy.right - 9, enemy.y + 12 + eye_y_adj), 3)
        pygame.draw.circle(screen, RED, (enemy.right - 9, enemy.y + 12 + eye_y_adj), 1)

def draw_ui(current_time):
    # Top HUD background panel bar
    pygame.draw.rect(screen, (20, 35, 25), (0, 0, WIDTH, 45))
    pygame.draw.line(screen, LIGHT_GREEN, (0, 45), (WIDTH, 45), 2)

    # Texts
    score_text = bold_font.render(f"SCORE: {score}", True, WHITE)
    lives_text = bold_font.render(f"LIVES: {lives}", True, RED if lives == 1 else WHITE)
    screen.blit(score_text, (20, 13))
    screen.blit(lives_text, (150, 13))
    
    if current_time < shield_timer:
        seconds_left = int(math.ceil((shield_timer - current_time) / 1000.0))
        shield_text = font.render(f"������� SHIELD ACTIVE: {seconds_left}s", True, CYAN)
        screen.blit(shield_text, (260, 14))

    danger_val = int((current_enemy_speed - BASE_ENEMY_SPEED)*10) + 1
    speed_text = bold_font.render(f"DANGER LVL: {danger_val}", True, ORANGE)
    screen.blit(speed_text, (WIDTH - 160, 13))

def game_over_screen():
    screen.fill((15, 15, 20))
    # Outer box red accent frame
    pygame.draw.rect(screen, DARK_RED, (40, 40, WIDTH - 80, HEIGHT - 80), 4, 8)

    text1 = big_font.render("GAME OVER", True, RED)
    text2 = bold_font.render(f"Final Score Secured: {score}", True, WHITE)
    text3 = font.render("Press [ R ] to Restart   ���   Press [ Q ] to Quit", True, LIGHT_BLUE)

    screen.blit(text1, (WIDTH // 2 - text1.get_width() // 2, 140))
    screen.blit(text2, (WIDTH // 2 - text2.get_width() // 2, 220))
    screen.blit(text3, (WIDTH // 2 - text3.get_width() // 2, 280))
    pygame.display.update()

def reset_game():
    global player_x, player_y, lives, score, friendly_animals, enemies, current_enemy_speed, shield_timer, player_trail
    player_x = WIDTH // 2
    player_y = HEIGHT // 2
    lives = 3
    score = 0
    player_trail = []
    current_enemy_speed = BASE_ENEMY_SPEED
    shield_timer = pygame.time.get_ticks() + shield_duration  
    friendly_animals = []
    enemies = []
    for _ in range(4):
        spawn_friendly()
    for _ in range(2):
        spawn_enemy()

reset_game()

running = True
while running:
    clock.tick(FPS)
    current_time = pygame.time.get_ticks()

    if lives <= 0:
        game_over_screen()
        waiting = True
        while waiting:
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    running = False
                    waiting = False
                if event.type == pygame.KEYDOWN:
                    if event.key == pygame.K_r:
                        reset_game()
                        waiting = False
                    elif event.key == pygame.K_q:
                        running = False
                        waiting = False
        continue

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    # Store player position for trail before movement
    player_trail.append((player_x, player_y))
    if len(player_trail) > 5: # Max trail elements length
        player_trail.pop(0)

    keys = pygame.key.get_pressed()
    moved = False
    if keys[pygame.K_LEFT] or keys[pygame.K_a]:
        player_x -= player_speed
        moved = True
    if keys[pygame.K_RIGHT] or keys[pygame.K_d]:
        player_x += player_speed
        moved = True
    if keys[pygame.K_UP] or keys[pygame.K_w]:
        player_y -= player_speed
        moved = True
    if keys[pygame.K_DOWN] or keys[pygame.K_s]:
        player_y += player_speed
        moved = True

    # Fade out trail if stationary
    if not moved and player_trail:
        player_trail.pop(0)

    player_x = max(0, min(WIDTH - player_size, player_x))
    player_y = max(0, min(HEIGHT - player_size, player_y))

    player_rect = pygame.Rect(player_x, player_y, player_size, player_size)

    move_enemies()
    check_collisions(player_rect, current_time)

    draw_forest()
    draw_objects(player_rect, current_time)
    draw_ui(current_time)

    pygame.display.update()

pygame.quit()

# data[].attributes.body
https://trinket.io/python/b360474d5187

https://canva.link/s2f123xy1bol1lr

Science Quiz

# data[].attributes.body
CANVA:https://canva.link/f4sixno3tmvnvz4

YOUTUBE:https://youtu.be/EaFKYCEvBj4

# data[].attributes.attachment_link.readable_text
import time
# ===========================
# Escape Adventure
# ===========================
key = 0
print("=" * 50)
print("ESCAPE ADVENTURE ")
print("=" * 50)
print("One day, you were walking through a HAUNTED HOUSE...")
time.sleep(2)
print("Soon as you walk in, the door close quickly and trap you inside")
time.sleep(2)
print("You saw three locked doors infront of  you")
time.sleep(2)
print("Then, you saw a letter on the floor")
time.sleep(2)
print("The letters says: Only people that can solve all five doors can escape!!")
time.sleep(3)
print("Your mission:")
time.sleep(1)
print("- Unlock all 5 doors")
time.sleep(1)
print("- Collect 5 keys")
time.sleep(1)
print("- ESCAPE!!!")
time.sleep(1)
input("Press ENTER to begin your adventure...")

# ===========================
# ROOM 1
# ===========================
print("ROOM 1 - The Rock, Paper, Scissors Door")

import random

computer = random.choice(["rock","paper","scissors"])

player = input("Rock, Paper or Scissors? ").lower()
time.sleep(1)

if player == computer:
    print("Draw!")

elif (player=="rock" and computer=="scissors") or \
(player=="paper" and computer=="rock") or \
(player=="scissors" and computer=="paper"):

    print("You Win!")
    key += 1

else:
    print("You Lose!")
    time.sleep(2)
    input("\nPress ENTER to continue to Room 2...")

# ===========================
# ROOM 2
# ===========================
print("ROOM 1 - The Memory Door")

import time

print("Remember this password!")

print("1758")

time.sleep(3)

print("\n"*50)

answer = input("What was the password? ")

if answer == "1758":
    print("Correct!")
    key += 1
    print("Remember this password!")

else:
    print("Wrong!")
    time.sleep(2)
    print("Remember this password!")

print("1357911")

time.sleep(3)

print("\n"*50)

answer = input("What was the password? ")

if answer == "1357911":
    print("Correct!")
    key += 1
else:
    print("Wrong!")
    time.sleep(1)
    input("\nPress ENTER to continue to Room 3...")

# ===========================
# ROOM 3
# ===========================
print("ROOM 3 - The Coin Guessing Door")

import random

coin = random.choice(["HEADS","TAILS"])

guess = input("Heads or Tails? ").upper()

if guess == coin:
    print("Correct!")
    key += 1
else:
    print("Wrong!")
print("You see two tunnels.")

print("A. Left")

print("B. Right")

choice = input("Choose: ").upper()

if choice == "A":
    print("Correct Way!")
else:
  print("Wrong way!")
  time.sleep(2)
  input("\nPress ENTER to continue to Room 4...")



# ===========================
# ROOM 4
# ===========================
print("ROOM 4 - The Password Door")
time.sleep(2)
print("Password Hint:")
time.sleep(2)
print("- 5 letters")
time.sleep(2)
print("- Starts with G")
time.sleep(2)
print("- Haunted houses have them.")
time.sleep(2)

guess = input("Password: ").upper()

if guess == "GHOST":
    print("You found the key!")
    key += 1
    time.sleep(1)
    input("\nPress ENTER to continue to Room 5...")

# ===========================
# ROOM 5
# ===========================
print("ROOM 5 - The Typing Door")

print("Type this exactly:")

print("I WANT THE KEY")

word = input("> ")

if word == "I WANT THE KEY":
    print("Door opened!")
    key += 1
else:
    print("You typed it wrong!")
    time.sleep(1)
    input("\nPress ENTER to continue to End...")


        # ===========================
# ENDING
# ===========================

print("\nFinal Results")

print("Keys:", key)

if key == 5:

    print("Perfect Escape!")
    print("\nSECRET ROOM UNLOCKED!")

    print("A treasure chest appears!")

    print("""
       ___________
      /__________/|
      | TREASURE||
      |_________||
    """)

    print("You found the hidden treasure!")

elif key >= 3:

    print("You escaped... but barely.")

else:

    print("You are trapped forever...")

# ===========================
# PLAY AGAIN
# ===========================

while True:

    again = input("\nWould you like to play again? (Y/N): ").upper()

    if again == "Y":

        print("\nPlease run the program again to start a new game.")
        break

    elif again == "N":

        print("\nGoodbye! Have a wonderful day! ����")
        break

    else:

        print("Please enter Y or N.")



# data[].attributes.body
Canva link:https://canva.link/oga2bbxapdj7vtl

YouTube link:https://youtu.be/kEjWDzT1aDg?feature=shared

# data[].attributes.body
canva

https://canva.link/y3nt164ewbp9jo1

YOUTUBE

https://youtu.be/JHw15maxshg?si=bZKc5pzNjLjGoge1

# data[].attributes.attachment_link.readable_text
mport pgzrun
import random

WIDTH = 800
HEIGHT = 600
TITLE = "Animal Adventure"

state = "title"

score = 0
lives = 3

player = Rect(100, 300, 40, 40)
food = Rect(600, 200, 25, 25)

wolves = [
    Rect(700, 100, 40, 40),
    Rect(700, 500, 40, 40)
]

speed = 5


def reset_game():
    global score, lives
    score = 0
    lives = 3
    player.x = 100
    player.y = 300

    for wolf in wolves:
        wolf.x = 700
        wolf.y = random.randint(50, 550)

    move_food()


def move_food():
    food.x = random.randint(50, 750)
    food.y = random.randint(50, 550)


def draw():
    screen.clear()

    if state == "title":
        screen.fill((50, 160, 80))

        screen.draw.text(
            "ANIMAL ADVENTURE",
            center=(400,120),
            fontsize=55,
            color="white"
        )

        screen.draw.filled_rect(
            Rect(300,250,200,70),
            "blue"
        )

        screen.draw.text(
            "START",
            center=(400,285),
            fontsize=40,
            color="white"
        )


    elif state == "story":
        screen.fill((150,220,170))

        screen.draw.text(
            "THE FOREST NEEDS HELP!",
            center=(400,100),
            fontsize=45,
            color="black"
        )

        screen.draw.text(
            "Collect food and protect the forest.\n"
            "Avoid the wolves!\n\n"
            "Press SPACE to start.",
            center=(400,280),
            fontsize=35,
            color="black"
        )


    elif state == "game":
        screen.fill((70,170,70))

        # player
        screen.draw.filled_rect(player,"orange")

        # food
        screen.draw.filled_rect(food,"red")

        # wolves
        for wolf in wolves:
            screen.draw.filled_rect(wolf,"gray")

        screen.draw.text(
            "Score: " + str(score),
            (10,10),
            fontsize=35,
            color="white"
        )

        screen.draw.text(
            "Lives: " + str(lives),
            (10,50),
            fontsize=35,
            color="white"
        )


    elif state == "gameover":
        screen.fill((150,50,50))

        screen.draw.text(
            "GAME OVER",
            center=(400,200),
            fontsize=70,
            color="white"
        )

        screen.draw.text(
            "Press R to restart",
            center=(400,350),
            fontsize=40,
            color="white"
        )


    elif state == "win":
        screen.fill((50,150,200))

        screen.draw.text(
            "YOU SAVED THE FOREST!",
            center=(400,200),
            fontsize=55,
            color="white"
        )

        screen.draw.text(
            "Press R to play again",
            center=(400,350),
            fontsize=40,
            color="white"
        )


def update():
    global state, score, lives

    if state != "game":
        return

    if keyboard.left:
        player.x -= speed
    if keyboard.right:
        player.x += speed
    if keyboard.up:
        player.y -= speed
    if keyboard.down:
        player.y += speed


    player.clamp_ip(Rect(0,0,WIDTH,HEIGHT))
    f player.colliderect(food):
        score += 1
        move_food()

        if score >= 10:
            state = "win"


    for wolf in wolves:

        if wolf.x < player.x:
            wolf.x += 2
        if wolf.x > player.x:
            wolf.x -= 2

        if wolf.y < player.y:
            wolf.y += 2
        if wolf.y > player.y:
            wolf.y -= 2


        if player.colliderect(wolf):

            lives -= 1

            player.x = 100
            player.y = 300

            wolf.x = 700
            wolf.y = random.randint(50,550)


            if lives <= 0:
                state = "gameover"



def on_mouse_down(pos):
    global state

    if state == "title":

        button = Rect(300,250,200,70)

        if button.collidepoint(pos):
            state = "story"



def on_key_down(key):
    global state

    if state == "story" and key == keys.SPACE:
        reset_game()
        state = "game"

# data[].attributes.body
https://canva.link/y8cwx8me5ogabq9

# data[].attributes.attachment_link.readable_text
print("Welcome to the Science Quiz Challenge!")
print("Answer the questions by typing A,B,C, or D.")
print("Each correct answer will give you 1 point.")
print("Lets start with Level 1!")
print("----------------------------------")

score = 0

# Question 1
print("1. Which animal is mammals?")
print("A. Turtle")
print("B. Shark")
print("C. Dolphin")
print("D. Frog")

answer = input("Your answer:").upper()


if answer =="C":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is C. Dolphin")
  
print("------------------------------")

# Question 2
print("2. What is the meaning of mutualism?")
print("A. Two or more organisms of different species live closely together and interact with one another.")
print("B. An interaction that benefits one organism only and harms the other.")
print("C. An interaction which only benefits one organism without harming or benefitting the other.")
print("D. An interaction that benefits both organisms.")

answer = input("Your answer:").upper()


if answer =="D":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is D. An interaction that benefits both organisms.")
  
print("------------------------------")

# Question 3
print("3. What is the effects of vitamin C?")
print("A. Scurvy")
print("B. Beri-beri")
print("C. Night blindness ")
print("D. Rickets")

answer = input("Your answer:").upper()


if answer =="A":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is A. Scurvy")
  
print("------------------------------")

# Question 4
print("4. In small intestine,Maltase digests maltose into _________.")
print("What is the answer to fill in the blank?")
print("A. Glycerol")
print("B. Dipeptides")
print("C. Amino acids")
print("D. Glucose")

answer = input("Your answer:").upper()


if answer =="D":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is D. Glucose")
  
print("------------------------------")

# Question 5
print("5. What is the process when solid become liquid?")
print("A. Freezing")
print("B. Melting")
print("C. Sublimation")
print("D. Evaporation")

answer = input("Your answer:").upper()


if answer =="B": 
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is B. Melting")
  
print("------------------------------")

# Question 6
print("6. What is the density of water?")
print("A. 1 g/cm��")
print("B. 2 g/cm��")
print("C. 0.5 g/cm��")
print("D. 1.5 g/cm��")

answer = input("Your answer:").upper()


if answer =="A":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is A. 1 g/cm��")
  
print("------------------------------")

# Question 7
print("7. Alcohol dissolve which solute?")
print("A. Lamp oil")
print("B. Nail varnish")
print("C. Perfume")
print("D. Oil extractor")

answer = input("Your answer:").upper()


if answer =="C":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is C. Perfume")
  
print("------------------------------")

# Question 8
print("8. What is the taste of acid?")
print("A. Sweet")
print("B. Sour")
print("C. Bitter")
print("D. Salty")

answer = input("Your answer:").upper()


if answer =="B":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is B. Sour")
  
print("------------------------------")

# Question 9
print("9. _________ and _________ secreted by the skin contain chemicals that can kills microorganisms?")
print("What are the answers to fill in the blank?")
print("A. Sweat and bacteria")
print("B. Sebum and oil")
print("C. Sweat and sebum")
print("D. Sweat and saliva")

answer = input("Your answer:").upper()

print("------------------------------")


if answer =="C":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is C. Sweat and sebum")

# Question 10
print("10. What is the factor that influence population size in an ecosystem?")
print("A. Presence of prey")
print("B. Illegal hunting")
print("C. Unrestricted logging")
print("D. Disease")

answer = input("Your answer:").upper()


if answer =="D":
  print("Correct!")
  score = score + 1
else:
  print("Wrong! The correct answer is D. Disease")
  
print("------------------------------")
  
print("------------------------------")
    
print("Quiz Level 1 finished!")
print("Your score is: ", score, "out of 10")

if score == 10:
  print("Excellent! You are a genius!")
elif score >= 5:
  print("Good job! Keep learning!")
else:
  print("Nice try! Study and try again!")

print("------------------------------")
print("Next : Quiz Level 2 !")
print("Want to continue to Quiz Level 2? (Y/N)")
choice = input().upper()

if choice == "Y":
    print("Great! Let's move on to Quiz Level 2!")
    print("Level 2 start : ")
    print("------------------------------")

     # Question 1
    print("1. Malaysia is one of the 12 _____________ countries in the world.")
    print("What are the answers to fill in the blank?")
    print("A. diversity")
    print("B. biodiversity")
    print("C. megabiodiversity")
    print("D. gigabiodiversity")

    answer = input("Your answer:").upper()


    if answer =="C":
      print("Correct!")
      score = score + 1
    else:
      print("Wrong! The correct answer is C. megabiodiversity")
  
    print("------------------------------")

     # Question 2
    print("2. Which two are the coomon charateristics of fish?")
    print("I. Poikilothermic")
    print("II. Homeothermic")
    print("III. Lay eggs")
    print("IV. Have scales and hard skin")

    print("A. I and IV")
    print("B. II and III")
    print("C. III and IV")
    print("D. I and III")

    answer = input("Your answer:").upper()


    if answer =="D":
     print("Correct!")
     score = score + 1
    else:
     print("Wrong! The correct answer is D. I and III")
  
    print("------------------------------")

    # Question 3
    print("3. An information below show a non-flowering plant,plant x.")
    print("Plant x :-Have Repoduce by producing spore")
    print("         -Vascular")
    print("What is plant x?")           

    print("A. Moss")
    print("B. Conifer")
    print("C. Monocotyledons")
    print("D. Fern")

    answer = input("Your answer:").upper()


    if answer =="D":
     print("Correct!")
     score = score + 1
    else:
     print("Wrong! The correct answer is D. Fern")
  
    print("------------------------------")

    # Question 4
    print("4. Which animal are secondary consumer?")
    print("I. Omnivore")
    print("II. Herbivore")
    print("III. Secondary carnivore")
    print("IV. Carnivore")

    print("A. I and IV")
    print("B. II and III")
    print("C. III and IV")
    print("D. I and III")

    answer = input("Your answer:").upper()


    if answer =="A":
     print("Correct!")
     score = score + 1
    else:
     print("Wrong! The correct answer is A. I and IV")
  
    print("------------------------------")

    # Question 5
    print("5. Dead plants and animals are decay by __________ and ___________ in the soil.")
    print("What are the answers to fill in the blank?")
    print("I. organism")
    print("II. bacteria")
    print("III. fungi")
    print("IV. snail")

    print("A. I and IV")
    print("B. II and III")
    print("C. III and IV")
    print("D. I and III")

    answer = input("Your answer:").upper()


    if answer =="B":
     print("Correct!")
     score = score + 1
    else:
     print("Wrong! The correct answer is B. II and III")
  
    print("------------------------------")

    # Question 6
    print("6. What is the function of protein?")
    print("A. supplies a lot of energy ")
    print("B. Maintain good health")
    print("C. Replace dead cells")
    print("D. Protects the organs")

    answer = input("Your answer:").upper()


    if answer =="C":
     print("Correct!")
     score = score + 1
    else:
     print("Wrong! The correct answer is C. Replace the dead cells")
  
    print("------------------------------")

    # Question 7
    print("7. What is name of the wall of human's small intestine?")
    print("A. Lacteal")
    print("B. Bile")
    print("C. Molecules")
    print("D. Villi")

    answer = input("Your answer:").upper()


    if answer =="D":
     print("Correct!")
     score = score + 1
    else:
     print("Wrong! The correct answer is D. Villi")
   
    print("------------------------------")

    # Question 8
    print("8. What is the vector of Leptospira sp. bacteria?")
    print("A. Rat")
    print("B. Crokroach")
    print("C. Fly")
    print("D. Aedes mosquito")

    answer = input("Your answer:").upper()


    if answer =="A":
     print("Correct!")
     score = score + 1
    else:
     print("Wrong! The correct answer is A. Rat")
  
    print("------------------------------")

    # Question 9
    print("9. During electrolysis,oxygen gas is produced at where?")
    print("A. Beaker")
    print("B. Anode")
    print("C. Test tube")
    print("D. Cathode")

    answer = input("Your answer:").upper()


    if answer =="B":
     print("Correct!")
     score = score + 1
    else:
     print("Wrong! The correct answer is B. Anode")
  
    print("------------------------------")

    # Question 10
    print("10. Which two factors are affecting the rate of evaporation of water?")
    print("I. Movement of air")
    print("II. Surrounding area")
    print("III. Presence of sunlight")
    print("IV. Humidity")

    print("A. I and IV")
    print("B. II and III")
    print("C. III and IV")
    print("D. I and III")

    answer = input("Your answer:").upper()


    if answer =="A":
     print("Correct!")
     score = score + 1
    else:
     print("Wrong! The correct answer is A. I and IV")

    print("------------------------------")
  
    print("------------------------------")

    print("Quiz Level 2 finished!")
    print("Your score is: ", score, "out of 20")

    if score == 20:
     print("Excellent! You are a genius!")
    elif score >= 10:
     print("Good job! Keep learning!")
    else:
     print("Nice try! Study and try again!")

    print("------------------------------")


elif choice == "N":
     print("Thanks for playing!")
     exit()
else:
     print("Invalid input,please enter 'Y' or 'N'.")


print("Next : Quiz Level 3 !")
print("Want to continue to Quiz Level 3? (Y/N)")
choice = input().upper()

if choice == "Y":
     print("Great! Let's move on to Quiz Level 3!")
     print("Level 3 start : ")
     print("------------------------------")

     # Question 1
     print("1. What is colloid?")
     print("A. a substance thet can dissolove in a liquid.")
     print("B. a mixture of two or more solutes dispersed evenly in a solvent.")
     print("C. a liquid that dissolve a substance.")
     print("D. a mixture formed when a solute dissolves in a solvent.")

     answer = input("Your answer:").upper()


     if answer =="B":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is B. a mixture of two or more solutes dispersed evenly in a solvent. ")
  
     print("------------------------------")

     # Question 2
     print("2. What is the function of oxidation?")
     print("A. to separate suspended particles from liquid")
     print("B. dissolved substances")
     print("C. to kills microorganisms")
     print("D. to increase oxygen content in the water")

     answer = input("Your answer:").upper()


     if answer =="D":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is D. to increase oxygen content in the water ")
  
      print("------------------------------")

      # Question 3
      print("3. What colour will be change when phenolphthalein was added with acid?")
      print("A. Colourless")
      print("B. Pink")
      print("C. Yellow")
      print("D. Blue")

      answer = input("Your answer:").upper()


     if answer =="A":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is A. Colourless")
  
      print("------------------------------")

      # Question 4
      print("4. What is the name of the force acting if we are riding a bicycle?")
      print("A. Electrical energy")
      print("B. Sound energy")
      print("C. Heat energy")
      print("D. Kinetic energy")

      answer = input("Your answer:").upper()


     if answer =="D":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is D. Kinetic energy")
  
      print("------------------------------")

     # Question 5
     print("5. Which two are classification of levers?")
     print("I. First class lever")
     print("II. Third class lever")
     print("III. Fifth class lever")
     print("IV. Fourth class lever")

     print("A. I and IV")
     print("B. II and III")
     print("C. III and IV")
     print("D. I and II")

     answer = input("Your answer:").upper()


     if answer =="D":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is D. I and II")
  
      print("------------------------------")

     # Question 6
     print("6. Which disease are transmitted through contact?")
     print("I. Anopheles mosquito")
     print("II. Ringworm")
     print("III. Fly")
     print("IV. Tinea")

     print("A. I and IV")
     print("B. II and IV")
     print("C. III and IV")
     print("D. I and III")

     answer = input("Your answer:").upper()


     if answer =="B":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is B. II and IV")
  
      print("------------------------------")

     # Question 7
     print("7. What is the temperature(K) of orange colour star?")
     print("A. 6000-7500")
     print("B. 1500-3000")
     print("C. 7500-11000")
     print("D. 3500-5000")

     answer = input("Your answer:").upper()


     if answer =="D":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is D. 3500-5000")
  
      print("------------------------------")

     # Question 8
     print("8. Heat is a form of _________.")
     print("What are the answers to fill in the blank?")
     print("A. Energy")
     print("B. Substance")
     print("C. Particle")
     print("D. Mixture")

     answer = input("Your answer:").upper()


     if answer =="A":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is A. Energy")
  
      print("------------------------------")

     # Question 9
     print("9. Lipase digests fat into ___________ and __________ .")
     print("What are the answers to fill in the blank?")
     print("I. maltose")
     print("II. fatty acids")
     print("III. glucose")
     print("IV. glycerol")

     print("A. I and IV")
     print("B. II and IV")
     print("C. III and IV")
     print("D. I and III")

     answer = input("Your answer:").upper()


     if answer =="B":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is B. II and IV")

      print("------------------------------")

     # Question 10
     print("10. At what age does a baby needs to be injected Hib?")
     print("A. 2 months")
     print("B. 1 month")
     print("C. 5 months")
     print("D. 8 months")

     answer = input("Your answer:").upper()


     if answer =="A":
      print("Correct!")
      score = score + 1
     else:
      print("Wrong! The correct answer is A. 2 months")

      print("------------------------------")

     print("------------------------------")

     print("Quiz Level 3 finished!")
     print("Your score is: ", score, "out of 30")

     if score == 30:
      print("Excellent! You are a genius!")
     elif score >= 15:
      print("Good job! Keep learning!")
     else:
      print("Nice try! Study and try again!")

     print("------------------------------")
     print("Want to play again? (Y/N)")
     choice = input().upper()

     if choice == "Y":
      print("Great! Let's play again!")

     elif choice == "N":
      print("Thanks for playing!")
     else:
      print("Invalid input. Please enter 'Y' or 'N'.")
elif choice == "N":
     print("Thanks for playing!")
     exit()
else:
     print("Invalid input,please enter 'Y' or 'N'.")
     

   



# data[].attributes.body
canva: https://canva.link/bcbplroym0nk790

yt: https://youtu.be/HfF6MYNXN0c

# data[].attributes.attachment_link.readable_text
def calculate_bmi(weight, height_m):
    return weight / (height_m * height_m)

def get_bmi_category(bmi):
    if bmi < 18.5:
        return "Underweight"
    elif bmi < 25:
        return "Normal"
    elif bmi < 30:
        return "Overweight"
    else:
        return "Obese"
        
print ("Welcome to BMI calculator! Let's see how healthy you are and we will give you advice based on your results!�������� ")

# Input
name = input("Enter your name: ")
gender = input("Enter your gender (Male/Female): ")
age = int(input("Enter your age: "))
weight = float(input("Enter your weight in kg: "))
height_cm = float(input("Enter your height in cm: "))

height_m = height_cm / 100

bmi = calculate_bmi(weight, height_m)
category = get_bmi_category(bmi)

def get_health_advice(bmi):
    if bmi < 18.5:
        return "Eat more nutrient-rich foods and consider strength training."
    elif bmi < 25:
        return "Great job! Keep maintaining your healthy lifestyle."
    elif bmi < 30:
        return "Increase physical activity and improve your diet."
    else:
        return "Consider consulting a healthcare professional immediately for a safe weight plan."

print("\n===== BMI RESULT =====")
print("Name:", name)
print("Gender:", gender)
print("Age:", age)
print("Weight:", round(weight, 1), "kg")
print("Height:", round(height_cm, 1), "cm")
print("BMI:", round(bmi, 2))
print("Category:", category)
print("Health Advice:", get_health_advice(bmi))

def get_health_advice(bmi):
    if bmi < 18.5:
        print ("Eat more nutrient-rich foods and consider strength training.")
    elif bmi < 25:
        print ("Great job! Keep maintaining your healthy lifestyle.")
    elif bmi < 30:
        print ("Increase physical activity and improve your diet.")
    else:
        print ("Consider consulting a healthcare professional immediately for a safe weight plan.")

print ("------------------------------------------------------------")
print ("Time for a quiz to test yourself on how you should stay healthy! ��������")
print ("Answer the questions by typing in A, B, C or D.")
print ("------------------------------------------------------------")

score = 0

# Question 1
print ("1. What should you include more in your meals?")
print ("A. Red meat")
print ("B. Oils and fats")
print ("C. Green vegetables")
print ("D. Nuts")

answer = input ("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is C.")

print ("------------------------------------------------------------")

# Question 2
print ("2. How many glasses of water we should drink a day?")
print ("A. 8 glasses")
print ("B. 3 glasses")
print ("C. 6 glasses")
print ("D. 13 glasses")

answer = input ("Your answer: ").upper()

if answer == "A":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is A.")

print ("------------------------------------------------------------")

# Question 3
print ("3. How many hours of sleep is only enough for teenagers?")
print ("A. Stay up late instead")
print ("B. 12 hours")
print ("C. 6 hours")
print ("D. 8 hours")

answer = input ("Your answer: ").upper()

if answer == "D":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is D.")

print ("------------------------------------------------------------")

# Question 4
print ("4. What should we do every 6 months?")
print ("A. Eat excessive sugary foods")
print ("B. Go to a hospital/clinic for a full body check-up")
print ("C. Hit the gym")
print ("D. Be a couch potato for a whole day")

answer = input ("Your answer: ").upper()

if answer == "B":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is B.")

print ("------------------------------------------------------------")

# Question 5
print ("5. What shouldn't we do when trying to stay healthy?")
print ("A. Exercise every week for 30 minutes")
print ("B. Plan a great diet plan")
print ("C. Try smoking")
print ("D. Go to sleep early and wake up early")

answer = input ("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    score = score + 1
else:
    print("Wrong! The answer is C.")

print ("------------------------------------------------------------")

if score == 5:
    print ("Amazing job! You're well educated on how to stay healthy.")

if score == 4:
    print ("Not bad! You have a sense on how to stay healthy.")

if score == 3:
    print ("Don't worry! Try answering the quiz again.")

if score == 2:
    print ("Don't worry! Try answering the quiz again.")

if score == 1:
    print ("Don't worry! Try answering the quiz again.")

# data[].attributes.body
https://youtu.be/p4EsVy61uig

# data[].attributes.attachment_link.readable_text
import pygame
import random
import sys

# ----------------------------
# SDG 3: Healthy Choice Game
# Objective:
# 1. Menggalakkan gaya hidup sihat
# 2. Mengajar pemain membuat pilihan yang baik
# 3. Meningkatkan kesedaran tentang kesihatan
# ----------------------------

pygame.init()

# Screen settings
WIDTH = 800
HEIGHT = 500
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("SDG 3 - Healthy Choice Game")

clock = pygame.time.Clock()

# Fonts
font = pygame.font.SysFont(None, 32)
big_font = pygame.font.SysFont(None, 50)

# Colors
WHITE = (255, 255, 255)
BLUE = (50, 120, 255)
GREEN = (0, 200, 0)
RED = (220, 50, 50)
BLACK = (0, 0, 0)
LIGHT_BLUE = (220, 245, 255)

# Player - FIXED: Changed 'rect' to 'Rect'
player = pygame.Rect(380, 430, 40, 40)
player_speed = 6

# Game variables
good_items = []
bad_items = []
score = 0
health = 5
spawn_timer = 0


def spawn_item():
    x = random.randint(0, WIDTH - 30)

    if random.random() < 0.5:
        # Healthy item
        good_items.append(pygame.Rect(x, -30, 30, 30))
    else:
        # Unhealthy item
        bad_items.append(pygame.Rect(x, -30, 30, 30))


running = True

while running:

    # Events
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    # Keyboard input
    keys = pygame.key.get_pressed()

    if keys[pygame.K_LEFT]:
        player.x -= player_speed

    if keys[pygame.K_RIGHT]:
        player.x += player_speed

    # Keep player inside screen
    if player.x < 0:
        player.x = 0

    if player.x > WIDTH - player.width:
        player.x = WIDTH - player.width

    # Spawn items
    spawn_timer += 1

    if spawn_timer >= 30:
        spawn_item()
        spawn_timer = 0

    # Move healthy items
    for item in good_items[:]:
        item.y += 5

        if item.colliderect(player):
            score += 1
            good_items.remove(item)

        elif item.y > HEIGHT:
            good_items.remove(item)

    # Move unhealthy items
    for item in bad_items[:]:
        item.y += 5

        if item.colliderect(player):
            health -= 1
            bad_items.remove(item)

        elif item.y > HEIGHT:
            bad_items.remove(item)

    # Drawing
    screen.fill(LIGHT_BLUE)

    # Player
    pygame.draw.rect(screen, BLUE, player)

    # Healthy items
    for item in good_items:
        pygame.draw.rect(screen, GREEN, item)

    # Unhealthy items
    for item in bad_items:
        pygame.draw.rect(screen, RED, item)

    # Instructions
    screen.blit(font.render("Green = Healthy Choice", True, GREEN), (10, 10))
    screen.blit(font.render("Red = Unhealthy Choice", True, RED), (10, 40))

    # Score and health
    screen.blit(font.render(f"Score : {score}", True, BLACK), (620, 10))
    screen.blit(font.render(f"Health : {health}", True, BLACK), (620, 40))

    # Game Over
    if health <= 0:
        game_over = big_font.render("GAME OVER", True, RED)
        screen.blit(game_over, (250, 180))

        message = font.render(
            "Remember: Make healthy choices every day!",
            True,
            BLACK,
        )
        screen.blit(message, (170, 250))

        pygame.display.update()
        pygame.time.wait(3000)
        break

    pygame.display.update()
    clock.tick(60)

pygame.quit()
sys.exit()

# data[].attributes.body
youtube link:https://youtu.be/_8QA5ni60ZU Canva link:https://canva.link/05bib6aoxufkgg8

# data[].attributes.attachment_link.readable_text

import pygame
import sys
import random

# Initialize Pygame
pygame.init()
pygame.font.init()

# Game Constants
WIDTH, HEIGHT = 800, 600
FPS = 60

# Colors
BG_COLOR = (24, 24, 32)
PANEL_COLOR = (36, 37, 49)
TEXT_COLOR = (240, 240, 245)
ACCENT_COLOR = (90, 104, 240)

# Choice Colors
COLOR_KNIGHT = (52, 152, 219)   # Blue
COLOR_DRAGON = (231, 76, 60)    # Red
COLOR_WIZARD = (155, 89, 182)   # Purple
COLOR_UNKNOWN = (149, 165, 166)  # Gray

# Setup Screen
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Knight, Dragon, Wizard")
clock = pygame.time.Clock()

# Fonts
font_title = pygame.font.SysFont("arial", 40, bold=True)
font_large = pygame.font.SysFont("arial", 28, bold=True)
font_medium = pygame.font.SysFont("arial", 22)
font_small = pygame.font.SysFont("arial", 16)

# Rules mapping
RULES = {
    "Knight": "Wizard",   # Knight beats Wizard
    "Dragon": "Knight",   # Dragon beats Knight
    "Wizard": "Dragon"    # Wizard beats Dragon
}

# Drawing vector icons dynamically
def draw_icon(surface, name, center, radius):
    cx, cy = center
    if name == "Knight":
        # Draw a Shield and Sword
        pygame.draw.circle(surface, COLOR_KNIGHT, center, radius)
        # Shield shape (triangle + rect mix simplified)
        points = [(cx-20, cy-20), (cx+20, cy-20), (cx+20, cy), (cx, cy+25), (cx-20, cy)]
        pygame.draw.polygon(surface, (220, 220, 230), points)
        pygame.draw.line(surface, (180, 180, 190), (cx, cy-20), (cx, cy+25), 3)
    elif name == "Dragon":
        # Draw a Dragon Flame
        pygame.draw.circle(surface, COLOR_DRAGON, center, radius)
        # Flame layers
        points1 = [(cx, cy-30), (cx+20, cy+10), (cx+10, cy+25), (cx-10, cy+25), (cx-20, cy+10)]
        points2 = [(cx, cy-15), (cx+12, cy+10), (cx+5, cy+20), (cx-5, cy+20), (cx-12, cy+10)]
        pygame.draw.polygon(surface, (255, 120, 0), points1)
        pygame.draw.polygon(surface, (255, 210, 0), points2)
    elif name == "Wizard":
        # Draw a Wizard Hat
        pygame.draw.circle(surface, COLOR_WIZARD, center, radius)
        # Hat triangle
        points = [(cx, cy-30), (cx-25, cy+15), (cx+25, cy+15)]
        pygame.draw.polygon(surface, (60, 30, 120), points)
        # Brim
        pygame.draw.ellipse(surface, (80, 40, 160), (cx-35, cy+10, 70, 12))
        # Star details
        pygame.draw.circle(surface, (255, 255, 150), (cx, cy-5), 4)
    else:
        # Mystery icon for AI choice before reveal
        pygame.draw.circle(surface, COLOR_UNKNOWN, center, radius)
        text = font_large.render("?", True, (50, 50, 50))
        surface.blit(text, text.get_rect(center=center))

class Button:
    def __init__(self, x, y, w, h, text, choice_name, color):
        self.rect = pygame.Rect(x, y, w, h)
        self.text = text
        self.choice_name = choice_name
        self.color = color
        self.is_hovered = False

    def handle_event(self, event):
        if event.type == pygame.MOUSEMOTION:
            self.is_hovered = self.rect.collidepoint(event.pos)
        if event.type == pygame.MOUSEBUTTONDOWN:
            if event.button == 1 and self.is_hovered:
                return self.choice_name
        return None

    def draw(self, surface):
        # Draw button background
        draw_color = [min(255, c + 30) for c in self.color] if self.is_hovered else self.color
        pygame.draw.rect(surface, draw_color, self.rect, border_radius=10)
        
        # Render text
        txt_surf = font_medium.render(self.text, True, TEXT_COLOR)
        surface.blit(txt_surf, txt_surf.get_rect(center=self.rect.center))

def determine_winner(player, ai):
    if player == ai:
        return "Tie Game!"
    elif RULES[player] == ai:
        return "You Win!"
    else:
        return f"{ai} wins this round! (AI)"

def main():
    # Game State Variables
    player_score = 0
    ai_score = 0
    player_choice = None
    ai_choice = None
    result_text = "Choose your champion to begin!"

    # Create UI Buttons
    btn_w, btn_h = 160, 50
    spacing = 40
    start_x = (WIDTH - (3 * btn_w + 2 * spacing)) // 2
    y_pos = 480

    buttons = [
        Button(start_x, y_pos, btn_w, btn_h, "Knight", "Knight", COLOR_KNIGHT),
        Button(start_x + btn_w + spacing, y_pos, btn_w, btn_h, "Dragon", "Dragon", COLOR_DRAGON),
        Button(start_x + 2 * (btn_w + spacing), y_pos, btn_w, btn_h, "Wizard", "Wizard", COLOR_WIZARD)
    ]

    # Reset Button
    reset_btn = Button(WIDTH // 2 - 60, HEIGHT - 50, 120, 35, "Reset Scores", "Reset", PANEL_COLOR)

    # Game Loop
    running = True
    while running:
        screen.fill(BG_COLOR)

        # Event Handling
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                running = False
            
            # Check interaction for selection buttons
            for btn in buttons:
                action = btn.handle_event(event)
                if action:
                    player_choice = action
                    ai_choice = random.choice(["Knight", "Dragon", "Wizard"])
                    result_text = determine_winner(player_choice, ai_choice)
                    
                    if "You Win" in result_text:
                        player_score += 1
                    elif "AI" in result_text:
                        ai_score += 1

            # Check interaction for reset button
            reset_action = reset_btn.handle_event(event)
            if reset_action:
                player_score = 0
                ai_score = 0
                player_choice = None
                ai_choice = None
                result_text = "Scores cleared! Choose your champion."

        # --- Draw UI Elements ---
        
        # Header / Title Block
        title_surf = font_title.render("Knight ��������� Dragon ��������� Wizard", True, TEXT_COLOR)
        screen.blit(title_surf, title_surf.get_rect(centerx=WIDTH // 2, top=30))
        
        # Rules Subtitle Header
        rules_surf = font_small.render("Rules: Knight beats Wizard | Wizard beats Dragon | Dragon beats Knight", True, (160, 160, 170))
        screen.blit(rules_surf, rules_surf.get_rect(centerx=WIDTH // 2, top=85))

        # Score Arena Panel
        arena_rect = pygame.Rect(50, 130, WIDTH - 100, 220)
        pygame.draw.rect(screen, PANEL_COLOR, arena_rect, border_radius=15)

        # Player Display Zone
        p_text = font_large.render(f"Player: {player_score}", True, TEXT_COLOR)
        screen.blit(p_text, (120, 150))
        draw_icon(screen, player_choice, (170, 240), 50)
        if player_choice:
            lbl = font_medium.render(player_choice, True, TEXT_COLOR)
            screen.blit(lbl, lbl.get_rect(centerx=170, top=300))

        # VS text middle
        vs_text = font_title.render("VS", True, ACCENT_COLOR)
        screen.blit(vs_text, vs_text.get_rect(center=(WIDTH // 2, 240)))

        # AI Display Zone
        ai_text = font_large.render(f"AI: {ai_score}", True, TEXT_COLOR)
        screen.blit(ai_text, (WIDTH - 240, 150))
        draw_icon(screen, ai_choice, (WIDTH - 170, 240), 50)
        if ai_choice:
            lbl = font_medium.render(ai_choice, True, TEXT_COLOR)
            screen.blit(lbl, lbl.get_rect(centerx=WIDTH - 170, top=300))

        # Dynamic Game Feedback Message Banner
        res_surf = font_large.render(result_text, True, ACCENT_COLOR if "Win" in result_text else TEXT_COLOR)
        screen.blit(res_surf, res_surf.get_rect(centerx=WIDTH // 2, top=390))

        # Render Game Action Choice Buttons
        for btn in buttons:
            btn.draw(screen)

        reset_btn.draw(screen)

        # Update Frame display
        pygame.display.flip()
        clock.tick(FPS)

    pygame.quit()
    sys.exit()

if __name__ == "__main__":
    main()
    

# data[].attributes.body
canva : https://canva.link/uyhqmd7vc3pef7b

youtube :https://youtu.be/d2YXt6i_k90

# data[].attributes.attachment_link.title
Cream and Brown Illustrative Food Journal Presentation

# data[].attributes.body
Canva link: https://canva.link/oga2bbxapdj7vtl

# data[].attributes.body
https://canva.link/dfoyuneya8bbht7

# data[].attributes.body
https://youtu.be/C11tDMlrmmM?si=I3jlZZpIqTjKEGcv

# data[].attributes.attachment_link.readable_text
import random

# Display the game title
print("=====================================")
print(" Welcome to the Treasure Hunt Game!")
print("=====================================")
print("Find the hidden treasure!")
print("Answer the questions correctly to earn your chance to find the treasure.")
print("You have 3 lives.")
print()

lives = 3

# Question 1
print("Question 1")
print("What is the capital city of Malaysia?")
print("A. Ipoh")
print("B. Penang")
print("C. Kuala Lumpur")

answer = input("Your answer: ").upper()

if answer != "C":
    lives -= 1
    print("Wrong! The correct answer is C: Kuala Lumpur.")
    print("Lives left:", lives)
else:
    print("Correct!")

print()

# Question 2
if lives > 0:
    print("Question 2")
    print("What is the largest planet in our solar system?")
    print("A. Earth")
    print("B. Jupiter")
    print("C. Saturn")

    answer = input("Your answer: ").upper()

    if answer != "B":
        lives -= 1
        print("Wrong! The correct answer is B: Jupiter.")
        print("Lives left:", lives)
    else:
        print("Correct!")

print()

# Question 3
if lives > 0:
    print("Question 3")
    print("What is the chemical symbol for gold?")
    print("A. Au")
    print("B. Ag")
    print("C. Fe")

    answer = input("Your answer: ").upper()

    if answer != "A":
        lives -= 1
        print("Wrong! The correct answer is A: Au.")
        print("Lives left:", lives)
    else:
        print("Correct!")

print()

# Treasure Hunt
if lives > 0:
    print("Great job! You still have", lives, "life/lives.")
    print("Now you may search for the treasure!")

    treasure = random.randint(1, 5)

    guess = int(input("Choose a number between 1 and 5: "))

    if guess == treasure:
        print("���� Congratulations! You found the treasure!")
    else:
        print("Sorry, you did not find the treasure.")
        print("The treasure was hidden at location", treasure)

else:
    print("Game Over!")
    print("You have no lives left.")

print()
print("Thank you for playing the Treasure Hunt Game!")

# data[].attributes.attachment_link.readable_text
import random

# Display the game title
print("=====================================")
print(" Welcome to the Treasure Hunt Game!")
print("=====================================")
print("Find the hidden treasure!")
print("Answer the questions correctly to earn your chance to find the treasure.")
print("You have 3 lives.")
print()

lives = 3
qualified = False

# Question 1
print("Question 1")
print("What is the capital city of Malaysia?")
print("A. Ipoh")
print("B. Penang")
print("C. Kuala Lumpur")

answer = input("Your answer: ").upper()

if answer == "C":
    print("Correct!")
    qualified = True
else:
    lives -= 1
    print("Wrong! The correct answer is C: Kuala Lumpur.")
    print("Lives left:", lives)

# Question 2
if not qualified and lives > 0:
    print("\nQuestion 2")
    print("What is the largest planet in our solar system?")
    print("A. Earth")
    print("B. Jupiter")
    print("C. Saturn")

    answer = input("Your answer: ").upper()

    if answer == "B":
        print("Correct!")
        qualified = True
    else:
        lives -= 1
        print("Wrong! The correct answer is B: Jupiter.")
        print("Lives left:", lives)

# Question 3
if not qualified and lives > 0:
    print("\nQuestion 3")
    print("What is the chemical symbol for gold?")
    print("A. Au")
    print("B. Ag")
    print("C. Fe")

    answer = input("Your answer: ").upper()

    if answer == "A":
        print("Correct!")
        qualified = True
    else:
        lives -= 1
        print("Wrong! The correct answer is A: Au.")
        print("Lives left:", lives)

# Treasure Hunt
if qualified:
    print("\nGreat job! Now you may search for the treasure!")

    treasure = random.randint(1, 5)

    guess = int(input("Choose a number between 1 and 5: "))

    if guess == treasure:
        print("���� Congratulations! You found the treasure!")
    else:
        print("Sorry, you did not find the treasure.")
        print("The treasure was hidden at location", treasure)

else:
    print("\nGame Over!")
    print("You have no lives left.")

print("\nThank you for playing the Treasure Hunt Game!")