Week 2 Lab Notebook
August 2023 (570 Words, 4 Minutes)
Week 2 Lab Notebook:
Game of life description:
I added the code for the game from the source provided in Slack announcments and added some styles to make it look more visually appealing.
Problems:
- There was a buggy line in the source, but when added to the code to run on the website, it would not work. I was also unable to paste in the line here without the page crashing
- When scrolling, the text, "Remix of game of life," would stay constant on the screen and would overlap with all elements of the website
Solutions:
- Removing the line was able to fix the website and it would continue to run properly
- I removed the text element in the HTML code that contained the buggy text, and the overlapping stopped
Skills used/learned:
- Editing HTML code to fix overlapping text errors
- Using CSS to apply styles to the buttons
Phone data table description:
I used the code from the JsOuput table to create my own table that contained the data of phone companies, models, release years, color, and price. I then added a little bit of styling to make more appealing.
Problems:
- I encountered an issue where the search bar overlapped with the data table values, most likely due to the fact that I styled the head of the table
Solutions:
- In my CSS styles, I added a margin so that the search bar would be moved further up
Skills used/learned:
- Editing HTML to change table values.\
- Adding and modifying CSS to style the table and fix visual issues
Snake game description:
Using the source code for the snake game, I was able to add a playable and fully functioning snake game into the website.
Problems:
- On both localhost and GitHub pages, I was unable to load the game page for some reason, and the tab would time out
Solutions:
- I switched browsers, and the page started working. It was an issue that only occurred on Chrome
Skills used/learned:
- Adding HTML code to put a functioning snake game into the website
Stock protfolio simulator description:
For this project, me and Tanay decided to collaborate on one big Python project that would allow us to pull and display stock data in a table using the pandas
module and Stooq
database. We also worked on a project to show this data on a graph but as of right now it does not fully work.
Problems:
- We wanted to use as many simulations as possible, so we moved the number to around 15,000 simulations
- The code kept timing out and couldn't fully execute because our computers couldn't handle that many, causing lagging and heating up
Solutions:
- We learned that 6000 was an optimal number of simulations for both accuracy and cost on computers
Skills used/learned:
- We used the Pandas module to express the data of stock prices which was pulled.
- We used the Stooq database from which we pulled data of 8 stocks.
- We used Python to code functions that would allow us to use the modules from above.