Here us my solution! It seems to work correctly.
Here is my solution.
Any feedback is appreciated.
I attempted to make the damage and the mortality functions scalable by accounting for changes in the scale category dictionaries. Testing shows it works but happy to have any suggestions for cleaner code!
Well i did the project on codecademy learning environment. i really wanted to do it offline. for that i even downloaded the script and tried to figure out how to do it on Gitbash. If anyone did offline, please share how.?
Thank you this is very helpful! I will give this method a try
Thank you, very helpful information
Thank you for all the resources!
It took me a looooooong while, but I hashed it out and completed the project with working code and even added a few extras to present the data a little clearer or just for practicing. I tried to only use what I have learned in the course so far. I kept having to come back to it after a break because life, but it got done.
Not bad, for a beginner!
Super open to feedback! I feel like I kept reinventing the wheel, but it’s just how my brain works when I learn something new. Hoping to get better at coding in one line, or at least in as few as possible, as I go along.
(I completed this challenge in Jupyter Notebook and just copied & pasted the code over to Codecademy)
Just finished my hurricanes project!
I have to admit, this was a really tricky assignment. Congrats to everyone else who pulled it off. I believe if we save this code for future reference it will be helpful when manipulating data in future!
Well, here it is!
Hi everyone! Here’s my solution to this project.
Hi, I really enjoyed reading through your code, and it’s interesting how different your code looks compared to mine.
This hurricane project was a big challenge for me, but I enjoyed it! First time working on Jupyter Notebook, and creating a repository in GitHub. I read through a couple of codes from other Codecademy users (after I finished my own) and it’s so interesting to see the different approaches to the same problems.
Here’s the link to my final code:
Feel free to comment or ask questions! ;o)
Main things I tried to do that were slightly different from the solution code were:
- Updating damages in-place
- Writing functions that could be used across a few different items (e.g. creating a dictionary for hurricanes keyed off hurricane name and another for hurricanes keyed off year seemed similar enough that I wrote a single function; same with grouping at the end).
- Make grouping functions dynamic (i.e. so I don’t have to hard-code groupings or evaluations)
Would appreciate any and all feedback!
Challenging project. Here is my code.
It is a great way to grasp about dictionary, list and looping.
My Hurricanes Analysis project
Thank you for the solution code, it’s nice to have it so I can check my work during this project. I do have a question about your solution for part 4, when you create the hurricanes by year dictionary (lines 54-67 in your solution code).
Specifically on line 66, you append the current hurricane to the year key in the dictionary you created. I tested that out myself but kept getting an attribute error saying ‘dict’ object has no attribute ‘append’. Instead I had to make my value a list in order to append anything. How did you append a value to an existing key in your dictionary? I must be missing something. Thank you!
You’re on the right track even if you didn’t spot it in the other user’s code. They’ve also used a list for the value of that key in the dictionary, so the
.append method is a list method being used. See if you can hunt down where .