DEV Community

Maitreyee Aggarwal
Maitreyee Aggarwal

Posted on

THE FIRST STEP

I printed my first "Hello, World!" about three days ago. Today, I committed to Google Summer of Code.

Day 1 (13th Aug 2025):

Language Chosen: Python
Learning resource:

Code:

`print("    /\\")
print("   /  \\")
print("  /    \\")
print(" /      \\")
print("/________\\")
human="zootri"
print(human)
print(human.upper())
print(human.lower())
print(human.isupper())
print(human.replace("z", "M"))
####calculator
a=input("Enter the number:")
b=input("Enter the second number:")
c=input("Enter the operator:")
if c=="+":
    result=(int(a)+int(b))
elif c=="-":
    result=(int(a)-int(b))
elif c=="*":
    result=(int(a)*int(b))
elif c=="/":
    result=(int(a)/int(b))
print("The result is:", result )

#### As u say
who=input("Name of a profession:")
who2=input("Common noun:")
place=input("Place:")
print("Despite the fact that", who," are relatively harmless, many" ,who2," continue to believe the pervasive myth that",who," are dangerous to", who2,". This impression of", who, " is exacerbated by their mischaracterization in", place)

####list
friends=["jin", "jimin", "jhope", "rm", "taehyung", "suga", "jungkook"]
print(friends[5])
#list 2.0
lucky_numbers=[4,8,15,16,23,42]
friends=["jin", "jimin", "jhope", "rm", "taehyung", "suga", "jungkook"]
friends.extend(lucky_numbers)

friends.append('zed')
friends.insert(0, "zootri")
friends.remove("taehyung")
friends.pop()
print(friends.count("jimin"))

####functions
def cube(num):
    return num*num*num
num= int(input("Enter a number to cube:"))
result= cube(num)
print(result)
####IF
is_male=False
is_tall=True
if is_male and is_tall:
    print("You are a male or tall or both")
elif is_male and not(is_tall):
    print("You are a")
else:
    print("you are not a male nor tall")`

Enter fullscreen mode Exit fullscreen mode

Day 2 (14th Aug 2025)

Language Chosen: Python
Learning resource:saw a be10x add. Decided to not "learn python in manual way in 2025", so I asked ChatGPT to teach me...this what i coded.

the code:

numbers=[(1, "odd"), (2, "even"), (3, " odd"), (4, "even"), (5, "odd"), (6, "even"), (7, "odd"), (8, "even"), (9, "odd"), (10, "even")]
for number in numbers:
    print(number) 

for number in range(1,11):
    if number % 2 == 0:
        print(number, " even")
    else:
        print(number, " odd")
for index, name in enumerate(friends):
        print(index, name)
####dictionary
phone_book={
    "Maitreyee": "123-456-7890",
    "Zed": "987-654-3210",
    "Jimin": "555-555-5555",
    "graceie": "111-222-3333",  
    "gargi": "444-555-6666",
}
name=input("Enter the name to search:")
if name in phone_book:
    print("Phone number:", phone_book[name])
else:
    print("Contact not found.")
#### Tuples
city=("delhi", "chandigarh", "new york", "paris", "london")
print(city[2])
#sets
fruits={"apple", "banana", "cherry", "orange", "kiwi", "mango"}
fruits.add("grapes")
fruits.remove("banana")
print(fruits)
#file handeling 
with open("notes.txt", "w") as file:
    file.write("1st.\n")
    file.write("2nd.\n")
    file.write("3rd.\n")
with open("notes.txt", "r") as file:
    print(file.read())
with open("notes.txt", "a") as file:
    file.write("\nThis is a new line added to the file.")
with open("notes.txt", "r") as file:
    print(file.read())
    # error handeling
try:
    num=int(input("enter a number: "))
    print(10/num)
except ZeroDivisionError:
    print("You cannot divide by zero!")
except ValueError:
    print("Please enter valid numbers only  ")
finally:
    print("Program finished")
Enter fullscreen mode Exit fullscreen mode

:| copied most of it

Day 3(15th aug 2025)

Learning Resource: Stuck to GPT

Code:

####eval
print(eval("345"))
print(eval("34-5"))
print(eval("3+4"))

####area
r=float(input("Enter the radius:"))
area=3.14*pow(float(r),2)
print("The area of your circle is",area)

####average calculator
N=int(input("Enter number of terms "))
num=[]
for i in range(N):
    i=int(input("Enter a number: "))
    num.append(i)
total=sum(num)
average= total/N
print("Your average is:", average)
####class
class Dog:
    def __init__(self, name):
       self.name= name

    def bark(self):
        print(f"{self.name} says Woof! ")
dog1 = Dog("Binod")
dog2 = Dog("Vinod")
dog1.bark()
dog2.bark()

class car:
    def __init__ (self, brand, model):
        self.brand = brand
        self.model = model
    def display(self):
        print(f"Car brand: {self.brand}, Model: {self.model}")

car1 = car("Toyota", "Corolla")
car2 = car("Tesla", "Model S")

car1.display()  
car2.display()  

#inheretance
class Animal:
    def __init__ (self, name):
        self.name = name

    def speak(self):
        print(f"(self.name) makes a sound.")
class Dog(Animal):
    def speak(self):
        print(f"{self.name} barks.")

# protected classes
class person:
    def __init__ (self, name, age):
        self._name= name
        self.__age= age
    def get_age(self):
        return self.__age
p= person("John", 30)
print(p._name)  # Accessing protected attribute
print(p.get_age())

# Contact Management System
class Contact:
    def __init__(self, name, phone, email):
        self.name = name
        self.phone = phone
        self.email = email

    def display(self):
        print(f"Name: {self.name}, Phone: {self.phone}, Email: {self.email}")


class Manager:
    def __init__(self):
        self.contacts = []

    def add_contact(self, contact):
        self.contacts.append(contact)

    def view_contacts(self):
        if not self.contacts:
            print("No contacts available.")
        else:
            for contact in self.contacts:
                contact.display()

    def search_contact(self, name):
        for contact in self.contacts:
            if contact.name.lower() == name.lower():
                contact.display()
                return
        print("Contact not found.")

    def delete_contact(self, name):
        for contact in self.contacts:
            if contact.name.lower() == name.lower():
                self.contacts.remove(contact)
                print(f"Contact {name} deleted.")
                return
        print("Contact not found.")


manager = Manager()  # Create an instance of Manager

while True:
    print("\n1. Add Contact")
    print("2. View All Contacts")
    print("3. Search Contact")
    print("4. Delete Contact")
    print("5. Exit")

    choice = input("Enter your choice (1-5): ")

    if choice == "1":
        name = input("Enter name: ")
        phone = input("Enter phone number: ")
        email = input("Enter email: ")
        new_contact = Contact(name, phone, email)
        manager.add_contact(new_contact)
        print("Contact added successfully.")

    elif choice == "2":
        manager.view_contacts()

    elif choice == "3":
        search_name = input("Enter name to search: ")
        manager.search_contact(search_name)

    elif choice == "4":
        delete_name = input("Enter name to delete: ")
        manager.delete_contact(delete_name)

    elif choice == "5":
        print("Exiting the program.")
        break

    else:
        print("Invalid choice. Please try again.")

#polymorphism
class shape:
    def area(self):
        print("Area calculation not defined")
class circle(shape):
    def __init__ (self, radius):
        self.radius = radius
    def area(self):
        return 3.14*pow(self.radius, 2)
class rectangle(shape):
    def __init__ (self, lenght, width):
        self.lenght = lenght
        self.width = width
    def area(self):
        return self.lenght*self.width
class triangle(shape):
    def __init__ (self, base, height):
        self.base = base
        self.height = height
    def area(self):
        return 0.5*self.base*self.height
shapes =[circle(5), rectangle(3,2), triangle(2,4)]
for s in shapes:
    print("Area:", s.area())
After over 4 hrs or grinding felt like i knew nothing:{
##Day-5(15th aug 2025)
# abstract class
from abc import ABC, abstractmethod
class Animal(ABC):
    @abstractmethod
    def make_sound(self):
        pass
class Dog(Animal):
    def make_sound(self):
        return "Woof!"
class Cat(Animal):
    def make_sound(self):
        return "Meow!"
#experience the real power oif abstract classes
from abc import ABC, abstractmethod
class transport(ABC):
    @abstractmethod
    def travel_time(self, distance):
        pass
class Bus(transport):
    def travel_time(self, distance):
        return distance/50
class Train(transport):
    def travel_time(self, distance):
        return distance/100
class Airplane(transport):
    def travel_time(self, distance):
        return distance/600
distance=300
transports = [Bus(), Train(), Airplane()]
for t in transports:
    print(f"Travel time by {t.__class__.__name__} for {distance} km: {t.travel_time(distance)} hours")
#one more way
from abc import ABC, abstractmethod
class Transport(ABC):
    def __init__ (self, speed):
        self.speed = speed

    def tarvel_time(self, distance):
        return distance / self.speed   
    @abstractmethod
    def travel_time(self, diatance):
        pass

class Bus(Transport):
    def travel_time(self, distance):
        return distance / self.speed

class Train(Transport):
    def travel_time(self, distance):
        return distance / self.speed
class Airplane(Transport):
    def travel_time(self, distance):
        return distance / self.speed    
distance =300
transports =[Bus(50), Train(100), Airplane(600)]
for t in transports:
    print(f"Travel time by {t.__class__.__name__} for {distance} km: {t.travel_time(distance)} hours")
Enter fullscreen mode Exit fullscreen mode

After 5 hours of grinding, I felt like I knew nothing, decided to take a second opinion. Put the same prompt in deepseek.
It helped me realise that my lack of confidence was due to knowledge gaps.

Day 4 (16th aug 2025):

Decided to write this post.
I will be studying from:
1)https://developers.google.com/edu/python
2)https://www.py4e.com/
3)https://realpython.com/

I’m writing this as a marker, not because I’ve “made it,” but because I’ve started.

This is Day 0 of my public programming log.
Some days will be wins, most will be confusion, but all of it will be recorded here.

If you’re reading this and thinking about starting your own journey, here’s my advice:
Don’t wait for the perfect tutorial, the ideal time, or a genius-level idea. Start now.
Even if it’s just a single line of code today — that’s enough to be your first step.
Stay tuned to see, how a first-year CS student with zero open-source experience plans to crack GSoC in 10 months.

Top comments (0)