Professional Documents
Culture Documents
01 ACKNOWLEDGEMENT
02 INTRODUCTION
04 FEATURES
05 HARDWARE USED
06 SOFTWARE USED
07 FUNCTIONS USED,MODULES
08 SOURCE CODE
09 OUTPUT
10 BIBLIOGRAPHY
INTRODUCTION
1. Upon launching the program, users are presented with a simple and intuitive
menu interface.
2. The main menu offers several options, including searching for stock prices,
accessing stock news, exploring historical data, and exiting the program.
3. When selecting the option to search for stock prices, users can enter the name or
symbol of the stock they want to explore.
4. The program utilizes the Google search engine to retrieve relevant search results
related to the stock. It opens the search results in the user's default web browser,
providing them with valuable information about the stock's performance,
financials, and more.
5. Similarly, when selecting the option to access stock news, users can enter the
name or symbol of a company or a specific topic they are interested in. The
program performs a targeted search for stock news related to the entered query and
opens the latest news articles in the web browser.
6. The program also offers the ability to explore historical stock data. By selecting
this option, users can access historical price charts, analyze trends, and gain
insights into a stock's performance over time.
7. Throughout the program, users are provided with clear instructions and prompts
to enter their preferences, such as stock names, search queries, and more
By combining the power of Python, web scraping, and the Google search engine,
the StockGuru program empowers users to stay informed about stock prices,
access relevant news articles, and explore historical data effortlessly. It provides a
convenient and user-friendly interface to assist individuals in their stock-related
research and decision-making process.
OBJECTIVE
1. Stock Search: Users can enter the name or symbol of a stock they are interested
in and retrieve its current price. The program opens web pages with more detailed
information about the stock.
2. Stock News: Users can search for news articles related to a specific company or
topic in the stock market. The program opens the latest news articles, keeping users
informed about important developments.
3. Historical Data: Users can explore historical stock data, including price charts
and trends over time. This feature helps users analyze a stock's performance and
make informed investment decisions.
4. User-Friendly Interface: The program has a simple menu interface that is easy to
navigate. Clear instructions guide users throughout the program, making it
accessible to users of all levels of expertise.
5. Customization: Users can customize the program by editing a text file. They can
add their own quiz questions or modify the content to suit their specific needs.
The goal of the "StockGuru" program is to provide a convenient and efficient way
for users to access stock-related information.
FEATURES
1. Login and Signup: The program includes a login and signup functionality. Users
can choose to log in if they have an existing account or sign up to create a new
account. This ensures secure access to the app and allows users to have
personalized experiences.
2. Stock Search: The program offers a stock search feature where users can enter
the name or symbol of a stock they want to learn more about. It utilizes the
`googlesearch` library to retrieve search results related to the stock. The program
opens the search results in the default web browser for easy access to information.
3. Stock News: In addition to stock search, the program provides a stock news
feature. Users can enter the name of a country to retrieve stock news specific to
that country. The program uses the entered query to generate a search term and
retrieves relevant news articles. The first search result is then opened in the web
browser.
5. File Handling: The program handles file operations to store user information
securely. When a user signs up, their username and password are stored in separate
text files for future login verification.
HARDWARE USED
• Graphics: Integrated
• Python 3.11.3
Libraries Used
3. `input`: The `input()` function is used to interactively prompt the user for input.
It is used to capture the user's choices, such as selecting menu options, entering
search queries, and confirming continuation.
4. `print`: The `print()` function is used to display messages, menus, and prompts
to the user. It is a built-in function for outputting text to the console.
5. `open`: The `open()` function is used to open and read files. In this program, it is
used to check for existing user accounts and read the password stored in a text file
during the login process.
1. **Main Menu**: The `main_menu()` function displays the main menu options
to the user. It allows the user to choose between login, signup, or exit.
2. **Login**: The `login()` function handles the login process. It prompts the user
to enter their username and password
3. **Signup**: The `signup()` function handles the signup process. It prompts the
user to enter a username and password.
import time
import webbrowser
def app(a):
print("""
--------------------------------------
| |
| Stonks |
| |
--------------------------------------
| |
| 2. Stock News |
| 3. Exit |
| |
--------------------------------------
""")
if value==1:
webbrowser.open(result)
if conts=="y":
app(a)
elif conts=="n":
return
elif value==2:
webbrowser.open(result)
if conts=="y":
app(a)
elif conts=="n":
return
else:
return
def login():
print("""
--------------------------------------
| |
| |
--------------------------------------
""")
if value_for_login.lower() == "y":
try:
if passval in openval:
time.sleep(3)
app(value_for_username)
else:
return
except FileNotFoundError:
time.sleep(3)
main_menu()
def signup():
print("""
--------------------------------------
| |
| |
--------------------------------------
""")
if value_for_signup.lower() == "y":
try:
open(value_for_username + ".txt", "r")
main_menu()
except FileNotFoundError:
openval.write(pass_val)
print("app")
app(value_for_username)
else:
main_menu()
def main_menu():
print("""
--------------------------------------
| |
| Stonks |
| |
--------------------------------------
| |
| 1. Login |
| 2. Signup |
| 3. Exit |
| |
--------------------------------------
""")
if value_for_entry == "1":
login()
signup()
return
else:
print("Invalid option. Please try again.")
main_menu()
main_menu()
.
OUTPUT
Option 1:
Option2:
Option 3:
Option4:
|
Bibliography
• Website: https://www.w3resource.com