DEV Community

Cover image for πŸš€ Day 66–67 Learning Log
Ramya .C
Ramya .C

Posted on

πŸš€ Day 66–67 Learning Log

Pattern Programs, Email & Password Utilities in Python

#100DaysOfCode β€’ #Python β€’ #BeginnerToPro β€’ #RamyaAnalyticsJourney

Here is a summary of everything I practiced and built during Day 66–67 of my coding journey.
I focused on pattern problems, email utilities, and password utilities β€” all useful for interviews and real-world coding.


⭐ 1. Pattern Programming (Stars & Numbers)

βœ” Star Pyramid

rows = 5
for i in range(1, rows + 1):
    print("* " * i)
Enter fullscreen mode Exit fullscreen mode

βœ” Right-Aligned Triangle

rows = 5
for i in range(1, rows + 1):
    print(" " * (rows - i) + "* " * i)
Enter fullscreen mode Exit fullscreen mode

βœ” Number Triangle

rows = 5
for i in range(1, rows + 1):
    for j in range(1, i + 1):
        print(j, end=" ")
    print()
Enter fullscreen mode Exit fullscreen mode

βœ” Reverse Pattern (using name)

name = "ramya"
length = len(name)

for i in range(length, 0, -1):
    for j in range(0, i):
        print(name[j], end=" ")
    print()
Enter fullscreen mode Exit fullscreen mode

πŸ“§ 2. Email Generator

name = input("Enter your name: ").lower().replace(" ", "")
domain = "gmail.com"

email = name + "@"+ domain
print("Generated Email:", email)
Enter fullscreen mode Exit fullscreen mode

βœ” 3. Email Validator (Regex)

import re

email = input("Enter email: ")

pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$'

if re.match(pattern, email):
    print("Valid Email")
else:
    print("Invalid Email")
Enter fullscreen mode Exit fullscreen mode

πŸ” 4. Password Generator

import random
import string

length = 10
password = ''.join(random.choice(string.ascii_letters + string.digits + string.punctuation) 
                   for _ in range(length))

print("Generated Password:", password)
Enter fullscreen mode Exit fullscreen mode

πŸ” 5. Password Validator

import re

password = input("Enter password: ")

pattern = r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$'

if re.match(pattern):
    print("Strong Password βœ”")
else:
    print("Weak Password ❌")
Enter fullscreen mode Exit fullscreen mode

πŸ“ What I Learned

  • Strengthened logical thinking
  • Improved nested loops & regex
  • Built practical utilities
  • Gained confidence for interview-style problems

πŸ”— GitHub Project Link

πŸ‘‰ GitHub:https://github.com/ramyacse21/python-workspace/blob/main/python%20practice%20(spl%20class).py


Python #CodingJourney #RamyaAnalyticsJourney #LearningLog #WomenInTech #CodeNewbie #Developers

Top comments (0)