Tanay's Portfolio

Coding with Brilliance, Playing with Passion

Hi! I'm Tanay — a curious high school student who got into coding through school. I enjoy building fun and meaningful apps. This page showcases my personal coding journey and projects. These projects were made with a partner so I wouldn't take full credit for the projects. Hopefully you like them! They are all based on the 17 global goals the United Nations has made to fix.

4 Global Goals

Description: This project showcases 4 of the 17 global goals in a small, standard picture made with code.

Concepts Learned: Making pictures with code, using shapes, gradients, and layering.

Challenges: It was time-consuming to plan and draw each image accurately using code.

Code:


### Life Below Water
Rect(0,0,200,200,fill='blue',border='black')
Label('Life Below Water',100,20,size=15,bold=True,font='monospace')
Oval(140,80,70,35,fill=gradient('cyan','blue'),border='black')
Polygon(120,80,80,60,80,100,fill=gradient('cyan','blue'),border='black')
Oval(90,150,80,35,fill=gradient('cyan','blue'),border='black')
Polygon(60,150,30,130,30,170,fill=gradient('cyan','blue'),border='black')
Circle(150,120,10,fill='lightCyan',border='black')
Circle(170,50,10,fill='lightCyan',border='black')
Circle(50,100,10,fill='lightCyan',border='black')
Circle(30,60,10,fill='lightCyan',border='black')
        

Explanation: I used shapes and gradients in Python to create an underwater scene for the "Life Below Water" goal. The fish and bubbles are coded using ovals, polygons, and circles with gradient fills.

Life on Land Slides

Description: This interactive slideshow project presents UN Goal 15, Life on Land, which shows us how the land is being degraded by multiple factors.

Concepts Learned: Learning functions, Parameters, event handlers such as onMouseRelease(), and muliple other things related to this project.

Challenges: Making transitions between slides work properly and positioning shapes responsively were tricky parts of the project.

Code:


Rect(0,0,400,400,fill='skyBlue')
Rect(0,300,400,100,fill='lightGreen')
sun = Star(120,150,20,9,roundness = 90, fill='yellow') 
sunback = Star(120,150,30,9,roundness = 10, fill='yellow')
def drawLogoA(x,y,radius):
    sun.centerX = x
    sun.centerY = y
    sun.radius = radius
    sunback.centerX = x
    sunback.centerY = y
    sunback.radius = (radius * 3)/2
    
tree = Polygon(100,345,140,315,155,280,195,280,210,315,250,345,fill='saddleBrown')

def drawLogoB(x,y,size):
    tree.centerX = x
    tree.centerY = y
    tree.width = size + 40
    tree.height = size

    
cause = Label('',200,150,size = 15)
effect = Label('',200,190,size = 15)
problemNumber = Label('',200,50,size = 24)
title = Label('',200,220,size = 30)
author = Label('',200,260,size = 20)
Line(0,0,0,400,lineWidth = 30)
progressbar = Line(0,0,0,57,lineWidth = 30,fill='yellow')
app.slide=0
if app.slide==0:
        drawLogoA(120,150,40)
        drawLogoB(280,350,60)
        title.value = 'Life on Land'
        author.value = 'Tanay and Gurshaan'
def onMouseRelease(x,y):
    app.slide=app.slide+1
    if app.slide ==7:
        app.slide=0
    if app.slide==1:
        drawLogoA(300,300,70)
        drawLogoB(75,308,30)
        problemNumber.value = 'Problem 1'
        cause.value = 'Deforestation is happening too quickly and as a '
        effect.value = 'result, the worlds forests are getting smaller'
        title.value = ''
        author.value = ''
        progressbar.y2 = 114
    

Explanation: In the functions drawLogoA, and drawLogoB, you can see they are a sun and a tree stump, respectively. These are drawn all across the slides, to an effect of Life on Land, and what Life on Land depends on, being the tree stump, and the sun respectively. In this given code snippet, you can see a number of variables defined in the code, which will be helpful for when the project operates. There is also a progress bar inside this code snippet, if you look closely at the variables. These variables and values help us build and help the project be what it is now.

Clean The Water!

Description: A clicking game where you clean up water by clicking on the tank. Each time you click on the tank, the water gets cleaner. It supports Global Goal 6: Clean Water and Sanitation.

Concepts Learned: I learned how to use mouse events, variables, conditionals, and counters to create interactive gameplay with resetting behavior.

Challenges: Getting the pollution to reset after reaching the clean goal and properly updating the tank counter took some debugging and testing.

Code:


placeholder
    

Explanation: This function checks for pollution clicks. Once 5 clicks are reached, the clean tank fills and the pollution is reset, reinforcing the cleanup idea.

Project Title

Description: Write a short description of your project here.

Concepts Learned: Write about what you learned here.

Challenges: What was hard? Describe it here.

Code:

// Paste your code here

Explanation: Add your explanation here.

Project Title

Description: Write a short description of your project here.

Concepts Learned: Write about what you learned here.

Challenges: What was hard? Describe it here.

Code:

// Paste your code here

Explanation: Add your explanation here.

Project Title

Description: Write a short description of your project here.

Concepts Learned: Write about what you learned here.

Challenges: What was hard? Describe it here.

Code:

// Paste your code here

Explanation: Add your explanation here.

Project Title

Description: Write a short description of your project here.

Concepts Learned: Write about what you learned here.

Challenges: What was hard? Describe it here.

Code:

// Paste your code here

Explanation: Add your explanation here.

Project Title

Description: Write a short description of your project here.

Concepts Learned: Write about what you learned here.

Challenges: What was hard? Describe it here.

Code:

// Paste your code here

Explanation: Add your explanation here.

Project Title

Description: Write a short description of your project here.

Concepts Learned: Write about what you learned here.

Challenges: What was hard? Describe it here.

Code:

// Paste your code here

Explanation: Add your explanation here.