Skip to content

Instantly share code, notes, and snippets.

View suynep's full-sized avatar
🎯
Focusing

Suyash Nepal suynep

🎯
Focusing
View GitHub Profile
# A strong password must have:
# At least 8 characters long
# At least one uppercase letter (A-Z)
# At least one lowercase letter (a-z)
# At least one number (0-9)
# Keep asking for a password until all requirements are met
# Give helpful feedback about what's missing
is_strong = False
while not is_strong:
decided_to_quit = False
while not decided_to_quit:
num = input("Enter the number: ")
num = int(num)
# how many rows to display?
rows = input("Enter the number of rows: ")
rows = int(rows)
# Number guessing game
# 7 attempts
# "too high" or "too low" indication
from random import randint
answer = 62 #randint(1, 100)
attempts = 7
while attempts > 0:
print("=== Multiplication Table Generator ===\n")
continue_program = "yes"
while continue_program == "yes":
# Get user input
number = int(input("Which number's table do you want? "))
rows = int(input("How many rows? "))
# Display table header
# Scaffold for number guessing game
attempts = 7
# Uncomment the following lines to get a random number
# from random import randint
# answer = randint(0, 100)
while attempts > 0:
pass
age = int(input("Enter your age: "))
days = """
1: Sunday
2: Monday
3: Tuesday
4: Wednesday
5: Thursday
6: Friday
7: Saturday
"""
age = int(input("Enter your age: "))
CURRENT_YEAR = 2026
birth_year = CURRENT_YEAR - age
# ========== Life Stage ==============
if 0 <= age <= 12:
print("🎭 Life Stage: Child")
elif 13 <= age <= 19:
print("🎭 Life Stage: Teenager")
history = []
while True:
if history != []:
continue_input = input("Do you want to continue (y/n): ")
if continue_input == "y":
pass
elif continue_input == "n":
print("Logs: ")
for h in history:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>YouTube Video Summary</title>
<style>
:root {
--jeans: #1a224a;
--jeans-light: #232d5c;