DEV Community

ParthParolekar
ParthParolekar

Posted on

Week 1 of #151daysofcode

I will be writing a blog every week to share my progress in the #151daysofcode challenge. Its been 2 weeks since I started this challenge and this is the summary of first week.

Day - 1/7

I completed a basic react project that shows the user some books based on the genres they select. It uses some of the basic react features like useState to update the state of the app depending on the genres the user selects. The genres are added dynamically so every time a book is added with a genre that is not already present, a button with that genre name is added in the app and when the user clicks that button, some books from that specific genre are displayed.

Live Project
Source Code

Day - 2/7

On day 2, I made an app with javascript that tells the user if their birthdate is lucky or not. The user inputs their birth-date and their lucky number. It then calculates the sum of digits in their birthdate. For example, if the birthdate is 1st January 2000, then the sum of digits will be (01/01/2000) 0+1+0+1+2+0+0+0=4.
If the sum of digits of the birth-date is divisible by the user's lucky number, then the user's birthdate is lucky, else it is not lucky.

Live Project
Source Code

Day - 3&4/7

On day 3 and 4, I worked on an app that tells the user the minimum number of notes to be returned to the customer. It takes bill amount as the first input and cash received as the second. If the bill amount is 50 and the cash received is 100, then the amount to be returned is 50. Now the app calculates the minimum number of notes to use to return the amount. Here it will be 1 note of 50.

Live Project
Source Code

Day - 5/7

On day 5, I made an app that checks if the user's birthdate is a palindrome or not. A palindrome is a word that spells the same backwards as well. For example "eye" is a palindrome.
The app checks if the user's birthdate is a palindrome in 3 different formats (dd/mm/yyyy, mm/dd/yyyy, mm/dd/yy). If it is not a palindrome, the app goes on to check the next or the previous date which could have been a palindrome and calculates the number of days to that date. This was one of the hardest problems to solve as there were a lot of things to take care of and coming up with a logic was not easy.

Live Project
Source Code

Day 6&7/7

I spent day 6 and 7 in creating an app about triangles. This app has multiple options that you can choose from. You can find the area of a triangle, check the hypotenuse of a triangle, check whether the three angles that you input make a triangle and finally you can take a simple quiz about triangles. You get 2 points for a correct answer, 0 if you skip the question and a point is deducted for every wrong answer.

Live Project
Source Code

Conclusion

This was pretty much what I did in my first 7 days of the #151daysofdcode challenge. I would recommend you to take part in this challenge as it helps me to be consistent. All you have to do is code at least an hour every day and share your progress on twitter. Click on this link if you want to participate.

Top comments (0)