📚 This video is a walkthrough of solving problem set 9 of CS50's Finance module.
💻 The goal is to build a website where users can buy and sell shares, requiring registration and login functionality.
🔑 To access share values, an API call is made using a registered API key.
✅ Registering a new user by hashing their password and adding them to the database.
🔒 Storing user information using session and redirecting them to their account after registration.
📈 Implementing a route to allow users to look up a stock's current price.
✅ The lookup function in helpers.py connects to the API using an API key and retrieves stock information based on a symbol.
📊 If the stock symbol exists, the lookup function returns the name, price, and symbol of the stock. Otherwise, it returns that the symbol doesn't exist.
💰 The quoted.html file receives the stock information from the lookup function and displays the name, price, and symbol of the stock.
📉📈 The buy route allows users to enter a symbol and the number of shares they want to buy. It checks if the user can afford the shares at the current price and updates the database with the transaction details.
💰 Calculating the transaction value by multiplying the number of shares with the stock price.
💸 Checking if the user has enough money by comparing their cash with the transaction value.
🔄 Updating the user's cash by subtracting the transaction value and updating the transaction table with the user ID, symbol, shares, price, and date.
💡 Extract relevant information about the user and their transactions to display in a table on the website.
💰 Calculate the total amount of shares and cash the user has.
📊 Create an HTML table using the extracted information to display the user's portfolio.
💡 Creating a new row in the table to display the total cash amount.
📊 Implementing the sell functionality to allow users to sell shares.
🔒 Performing various checks to ensure the user enters valid information and updating the user's cash and transaction tables accordingly.
The video covers the implementation of a feature that allows users to sell shares based on their account balance.
The video shows how to summarize and display the user's transaction history on their account.
The video also demonstrates adding a personal touch by allowing users to add additional cash to their accounts.
HISTORIA de las NIIF | Análisis de sus orígenes, emisión y uso
Unit 5: A Lecture about Feeding the World
Critican gestión de Petroperú y mal manejo de recursos
Бармены, Какую Дичь Вы Подслушали в Баре?
How to Make Time And Escape the Rat Race | Ft. Connor Swenson, Certified Teacher of Make Time
The Middle Ages Explained in 10 minutes