import streamlit as st import urllib.parse # ==== PAGE CONFIGURATION ==== st.set_page_config( page_title="Gen Z vs Millennial Quiz", page_icon="πŸ€–", layout="centered", menu_items={ "Get Help": None, "Report a bug": None, "About": None } ) # ==== HIDE STREAMLIT UI ==== st.markdown(""" """, unsafe_allow_html=True) # ==== QUIZ TITLE ==== st.title("✨ How Gen Z / Millennial Are You?") st.markdown("Answer these fun questions to find out your vibe!") score = 0 # ==== QUESTIONS ==== questions = [ ("What’s your go-to way of laughing online?", ["πŸ˜‚", "πŸ’€", "Lmao / lol", "Voice note of laughing"], [1, 2, 1, 2]), ("Your reaction to a missed call:", ["Panic & text", "Call back", "Wait 2 days", "Block them"], [1, 2, 2, 3]), ("How do you take selfies?", ["Front camera only", "Tripod", "Don’t take selfies", "Snapchat filters"], [1, 2, 1, 3]), ("Phone at 1% battery:", ["Plug in", "Accept fate", "Low power mode", "Cry"], [1, 2, 1, 2]), ("Which of these do you still use?", ["Facebook", "Instagram", "TikTok", "Email only"], [0, 1, 2, 1]), ("Ideal vacation:", ["Solo trip", "Food tour", "Photoshoot", "Stay at home"], [1, 2, 2, 0]), ("Favorite texting style:", ["all lowercase", "With punctuation", "No punc", "ALL CAPS"], [2, 1, 1, 2]), ("2000s song plays:", ["Cry a little", "Sing loudly", "Post it", "Ask what song?"], [1, 1, 2, 0]), ("Choose your cringe:", ["TikToks", "LinkedIn posts", "WhatsApp forwards", "Old FB posts"], [2, 1, 0, 1]), ("Current wallpaper:", ["My pet", "A quote", "Black screen", "Celebrity crush"], [1, 1, 2, 2]), ("Group chat vibe:", ["Silent", "Memes", "Venting", "Voice notes"], [0, 2, 1, 2]), ("Most like you:", ["Adulting is hard", "Main character energy", "Vibe check failed", "Nap and snack"], [1, 2, 2, 2]) ] # ==== QUIZ FORM ==== for i, (q, opts, points) in enumerate(questions): st.subheader(f"Q{i+1}. {q}") choice = st.radio("Choose an option", opts, key=i, label_visibility="collapsed") score += points[opts.index(choice)] # ==== RESULT ==== if st.button("πŸ” Reveal My Result"): st.markdown("---") if score >= 22: st.success("πŸŽ‰ You're Pure Gen Z! πŸ’… You speak in memes, fear nothing, and run on iced coffee.") st.markdown('', unsafe_allow_html=True) elif 14 <= score < 22: st.info("😎 You’re a Chill Millennial-Z Hybrid! You love both avocado toast and TikToks.") st.markdown('', unsafe_allow_html=True) else: st.warning("πŸ“ž You’re More Millennial Vibes – Emo songs, Facebook memories, and semi-adulting life.") st.markdown('', unsafe_allow_html=True) # Share st.markdown("### Share your result:") share_text = "I just took the Gen Z vs Millennial quiz! Find out your vibe here: https://ai.flexingdata.com" encoded_text = urllib.parse.quote(share_text) whatsapp_url = f"https://wa.me/?text={encoded_text}" st.markdown(f"[πŸ“² Share on WhatsApp]({whatsapp_url})", unsafe_allow_html=True)