You are on page 1of 24

SHRISHTI VIDYASHRAM

SENIOR SECONDARY SCHOOL, VELLORE


COMPUTER PROJECT PROJECT REPORT
POMODORO TIMER

Submitted By:
SANSKAR X11 A3
Submitted To:
Mrs.Sopna Department of Computer Science

1
BONAFIDE CERTIFICATE

This is to certify that,___________________________________________


studying in class ______________in ______________________________

__________________________________________________________

for the Academic year 2023 - 2024 has successfully completed his / her

Computer Science Project and submitted the report for SSCE BOARD Practical

Examinations held on__________________________________________ .

External Examiner Principal

Internal Examiner

2
TABLE OF CONTENTS

S.NO DESCRIPTION PAGE NO.

01 ACKNOWLEDGEMENT 03

02 INTRODUCTION 04

03 OBJECTIVES OF THE PROGRAM 06

04 FEATURES 07

05 HARDWARE USED 08

06 SOFTWARE USED 09

07 FUNCTIONS USED,MODULES 11

08 SOURCE CODE 12

09 OUTPUT 20

10 BIBLIOGRAPHY 24

INTRODUCTION

The program is a Python-based interactive stock-related application called


"StockGuru." It provides various features to search for stock information, stock

3
news, The program is designed to assist users in quickly accessing relevant stock-
related information and staying updated with the latest news.

Here's an overview of how the StockGuru program works:

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

4
8. The program ensures a smooth user experience by incorporating error handling
mechanisms to address situations like invalid input or unavailable data.

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.

5
OBJECTIVE

The objective of the "StockGuru" program is to create a user-friendly tool that


allows users to access stock-related information easily. The program offers the
following features:

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.

6. Error Handling: The program handles errors gracefully, providing feedback in


case of invalid input or unavailable data. This ensures smooth operation and a
better user experience.

The goal of the "StockGuru" program is to provide a convenient and efficient way
for users to access stock-related information.

6
FEATURES

The "StockGuru" program is designed to provide a user-friendly and interactive


stock information experience. Here's a breakdown of its main features and code
structure:

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.

4. User-Friendly Interface: The program presents a well-designed user interface


with clear menu options for login, signup, and various app functionalities. It guides
users through the available options and prompts for necessary inputs in a
straightforward manner.

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.

7
HARDWARE USED

• Processor: Intel® Core™ i5-1335H

• Memory: 16 GB DDR4-3200 MHz RAM (1 x 8 GB)

• Graphics: Integrated

• Storage: 1TB PCIe® Gen 4.0 x4 NVMe™ TLC M.2 SSD

8
SOFTWARE USED

• Operating system: Windows 11

• Python 3.11.3

9
Libraries Used

The "StockGuru" program is a Python-based stock information application that


provides users with stock search and news functionalities. Here's a breakdown of
the code and the standard libraries used:

1. `time`: The `time` module is imported to introduce delays in the program. It is


used to pause the execution for a few seconds to create a smoother user experience,
especially during transitions or before displaying certain messages.

2. `webbrowser`: The `webbrowser` module allows the program to open web


browser windows. It is used to open the search results and stock news articles in
the user's default web browser for easy access to information.

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.

6. `search` (from `googlesearch`): The `search` function is used to perform web


searches using Google. It is used to retrieve search results related to stock queries
and stock news articles.

10
FUNCTIONS USED

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.

4. **App**: The `app(a)` function represents the main functionality of the


program.

11
SOURCE CODE

import time

import webbrowser

from googlesearch import search

def app(a):

print("""

--------------------------------------

| |

| Stonks |

| |

--------------------------------------

| |

| 1. Search for Stocks |

| 2. Stock News |

| 3. Exit |

12
| |

--------------------------------------

""")

value=int(input("enter your option"))

if value==1:

query =input("what stock price do you want to see")

num_results =int(input("enter the number of recommendations u want"))

search_results = search(query, num_results=num_results)

for result in search_results:

webbrowser.open(result)

conts=input("do you want to continue")

if conts=="y":

app(a)

elif conts=="n":

return

elif value==2:

query = input("Enter the country: ")

vals_using_query = "stock news " + query

search_results = search(vals_using_query, num_results=1)

13
for result in search_results:

webbrowser.open(result)

if conts=="y":

app(a)

elif conts=="n":

return

else:

return

def login():

print("""

--------------------------------------

| |

| DO YOU WANT TO LOG IN? |

| |

14
--------------------------------------

""")

# Getting input for the login

value_for_login = input("y/n: ")

if value_for_login.lower() == "y":

value_for_username = input("Enter your username: ")

try:

# Do something with the file content

openval=open(value_for_username + ".txt", "r")

passval=input("enter your password")

if passval in openval:

print("your password is correct")

time.sleep(3)

print("taking you to the app")

app(value_for_username)

else:

return

15
except FileNotFoundError:

print("Your username does not exist")

time.sleep(3)

print("Taking you to the main menu")

main_menu()

def signup():

print("""

--------------------------------------

| |

| DO YOU WANT TO SIGN UP? |

| |

--------------------------------------

""")

value_for_signup = input("y/n: ")

if value_for_signup.lower() == "y":

value_for_username = input("Enter your username: ")

try:

16
open(value_for_username + ".txt", "r")

print("You already have an account")

print("taking you to the main menu")

main_menu()

except FileNotFoundError:

pass_val = input("Enter a password: ")

openval=open(value_for_username + ".txt", "w")

openval.write(pass_val)

print("app")

app(value_for_username)

else:

print("Taking you to the main menu")

main_menu()

def main_menu():

print("""

--------------------------------------

| |

17
| Stonks |

| |

--------------------------------------

| |

| 1. Login |

| 2. Signup |

| 3. Exit |

| |

--------------------------------------

""")

value_for_entry = input("Enter your option (1, 2, 3): ")

if value_for_entry == "1":

login()

elif value_for_entry == "2":

signup()

elif value_for_entry == "3":

print("Exiting the program...")

return

else:

18
print("Invalid option. Please try again.")

main_menu()

main_menu()

19
OUTPUT

Option 1:

20
Option2:

21
Option 3:

22
Option4:

23
|
Bibliography

• Computer Science with Python - Class XII By: Sumita Arora

• Computer Science with Python-Class XI BY: Sumita Arora

• Website: https://www.w3resource.com

• Vishal’s project 12 a3 pomodoro timer

24

You might also like