Source Code (1)
Source Code (1)
import random
import time
import mysql.connector as cnxn
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import sys
sql=cnxn.connect(user='root',password='@Dgraj123',host='localhost',charset='
utf8')
cursor=sql.cursor()
# cursor.execute('create database if not exists ammohaven ')
cursor.execute('use ammohaven;')
# cursor.execute('create table login_db(username_db varchar(30),name
varchar(30),dob date, password_db varchar(30) );')
cursor.execute("select*from login_db;")
table_rows=cursor.fetchall()
df=pd.DataFrame(table_rows,columns=['username_db','name','DOB','password_
db'])
# print(df)
# print()
# print(df.to_string())
def special_thanks():
print()
thanks='''𝗦𝗣𝗘𝗖𝗜𝗔𝗟 𝗧𝗛𝗔𝗡𝗞𝗦 𝗧𝗢
𝗠𝘀. 𝗦𝗺𝗶𝘁𝗮 𝗣𝗮𝗻𝘁'''
for i in thanks:
print(i,end="")
time.sleep(.22)
print("")
def co_founders():
1
print()
time.sleep(0.9)
print("*"*30)
time.sleep(0.5)
print("𝐂𝐨-𝐅𝐨𝐮𝐧𝐝𝐞𝐫𝐬 𝐨𝐟 𝐀𝐌𝐌𝐎 𝐇𝐀𝐕𝐄𝐍:")
print()
time.sleep(1.4)
random_value_1=None
random_value_2=None
random_value_3=None
ser1=None
lst2=None
random_value_3=random_value_2=random_value_1=random.randint(1,3)
while (random_value_1==random_value_2) :
random_value_2=random.randint(1,3)
while (random_value_2==random_value_3) or
(random_value_1==random_value_3):
random_value_3=random.randint(1,3)
2
elif random_value_1==2 and random_value_2==3 and random_value_3==1 :
print("•Kartik Bhatt")
time.sleep(1)
print("•Mridul Lohumi")
time.sleep(1)
print("•Divyanshu Giri Raj")
elif random_value_1==3 and random_value_2==1 and random_value_3==2 :
print("•Mridul Lohumi")
time.sleep(1)
print("•Divyanshu Giri Raj")
time.sleep(1)
print("•Kartik Bhatt")
elif random_value_1==3 and random_value_2==2 and random_value_3==1 :
print("•Mridul Lohumi")
time.sleep(1)
print("•Kartik Bhatt")
time.sleep(1)
print("•Divyanshu Giri Raj")
time.sleep(1)
print()
print('*'*30)
time.sleep(0.75)
def intro():
welcome=('''
██╗ ██╗███████╗██╗ █████╗ █████╗ ███╗
███╗███████╗
██║ ██╗ ██║██╔════╝██║
██╔══██╗██╔══██╗████╗ ████║██╔════╝
╚██╗████╗██╔╝█████╗ ██║ ██║ ╚═╝██║
██║██╔████╔██║█████╗
████╔═████║ ██╔══╝ ██║ ██║ ██╗██║
██║██║╚██╔╝██║██╔══╝
╚██╔╝ ╚██╔╝
███████╗███████╗╚█████╔╝╚█████╔╝██║ ╚═╝ ██║███████╗
╚═╝ ╚═╝ ╚══════╝╚══════╝ ╚════╝ ╚════╝ ╚═╝
╚═╝╚══════╝ ''')
3
for i in welcome:
time.sleep(0.0065)
print(i,end='')
time.sleep(0.75)
print()
print('''
████████╗██╗ ██╗██╗ ██████╗
╚══██╔══╝██║ ██║██║██╔════╝
██║ ███████║██║╚█████╗
██║ ██╔══██║██║ ╚═══██╗
██║ ██║ ██║██║██████╔╝
╚═╝ ╚═╝ ╚═╝╚═╝╚═════╝ ''')
time.sleep(0.75)
print('''
██╗ ██████╗
██║██╔════╝
██║╚█████╗
██║ ╚═══██╗
██║██████╔╝
╚═╝╚═════╝''')
time.sleep(1)
title=('''
___________________________________
_________________________________________
░█████╗░███╗░░░███╗███╗░░░███╗░█████╗░
██╗░░██╗░█████╗░██╗░░░██╗███████╗███╗░░██╗
██╔══██╗████╗░████║████╗░████║██╔══██╗
██║░░██║██╔══██╗██║░░░██║██╔════╝████╗░██║
███████║██╔████╔██║██╔████╔██║██║░░██║
███████║███████║╚██╗░██╔╝█████╗░░██╔██╗██║
██╔══██║██║╚██╔╝██║██║╚██╔╝██║██║░░██║
██╔══██║██╔══██║░╚████╔╝░██╔══╝░░██║╚████║
██║░░██║██║░╚═╝░██║██║░╚═╝░██║╚█████╔╝
██║░░██║██║░░██║░░╚██╔╝░░███████╗██║░╚███║
╚═╝░░╚═╝╚═╝░░░░░╚═╝╚═╝░░░░░╚═╝░╚════╝░
╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░╚══════╝╚═╝░░╚══╝''')
print(title)
4
time.sleep(0.75)
print()
print(" ",end="")
print(" -𝗪𝗘 𝗣𝗥𝗢𝗩𝗜𝗗𝗘 𝗤𝗨𝗔𝗟𝗜𝗧𝗬 𝗔𝗠𝗠𝗨𝗡𝗜𝗧𝗜𝗢𝗡")
time.sleep(1.5)
print()
print()
# **********************************************************************
today=date.today()
today_str=str(today)
print()
print('DATE:',today)
time.sleep(1)
print()
today_year=int(today_str[0:4])
today_month=int(today_str[5:7])
today_day=int(today_str[8:10])
def input_age():
def input_year_fxn():
global input_year
input_year=input("Enter your Birth Year as *YYYY* :")
print()
if input_year:
input_year_int=input_year
try:
input_year_int=int(input_year)
if type(input_year_int) is int:
def input_month_fxn():
global input_month
input_month=input('Enter your Birth Month as *MM* :')
5
print()
if input_month:
input_month_int=input_month
try:
input_month_int=int(input_month)
if type(input_month_int) is int:
def input_day_fxn():
global input_day
input_day=input('Enter your Birth Date as *DD* :')
print()
if input_day:
input_day_int=input_day
try:
input_day_int=int(input_day)
if type(input_day_int) is int:
print('Checking the input data...')
time.sleep(1)
age_check_logic()
except:
if not type(input_day_int) is int:
print()
print('⚠NOTE:You can only enter 𝗻𝘂𝗺𝗯𝗲𝗿𝘀')
print()
time.sleep(1.5)
print('Please re-enter it all to proceed.')
print()
print('*'*34)
print()
time.sleep(1)
input_day_fxn()
elif not input_day:
print()
print('⚠NOTE:You cannot leave it blank.')
print()
print('Please re-enter it to proceed.')
print()
input_day_fxn()
input_day_fxn()
6
except:
if not type(input_month_int) is int:
print()
print('⚠NOTE:You can only enter 𝗻𝘂𝗺𝗯𝗲𝗿𝘀')
print()
time.sleep(1.5)
print('Please re-enter it to proceed.')
print()
print('*'*34)
print()
time.sleep(1)
input_month_fxn()
7
elif not input_year:
print()
print('⚠NOTE:You cannot leave it blank.')
print()
print('Please do it again.')
print()
input_year_fxn()
input_year_fxn()
def age_check_logic():
#I used *global* keyword to make these variinput_yles available outside the
function too
#1. y wrong
if (int(input_year)>today_year) and (int(input_month)<=12) and
(int(input_day)<=31):
print()
print("⚠NOTE:Please Enter a valid birth year")
print()
input_age()
#2. y m wrong
elif (int(input_year)>today_year) and (int(input_month)>12) and
(int(input_day)<=31):
print()
print("⚠NOTE:Please Enter a valid Month and year")
print()
input_age()
#3 y d wrong
elif (int(input_year)>today_year) and (int(input_month)<=12) and
(int(input_day)>31):
print()
print('⚠NOTE:Please Enter a valid year and day')
print()
input_age()
#4. m wrong
elif (int(input_year)<=today_year) and (int(input_month)>12) and
(int(input_day)<=31):
8
print()
print('⚠NOTE:Please Enter a valid month')
print()
input_age()
#5. m y wrong
elif (int(input_year)>today_year) and (int(input_month)>12) and
(int(input_day)<=31):
print()
print('⚠NOTE:Please Enter a valid year and month')
print()
input_age()
#6. m d wrong
elif (int(input_year)<=today_year) and (int(input_month)>12) and
(int(input_day)>31):
print()
print('⚠NOTE:Please Enter a valid month and day')
print()
input_age()
#7. d wrong
elif (int(input_year)<=today_year) and (int(input_month)<=12) and
(int(input_day)>31):
print()
print('⚠NOTE:Please Enter a valid day')
print()
input_age()
#8. y m d wrong
elif (int(input_year)>today_year) and (int(input_month)>12) and
(int(input_day)>31):
print()
print('⚠⚠NOTE:All the criterias are WRONG, please fill again.')
print()
input_age()
9
print()
input_age()
#9 All correct
elif (int(input_year)<=today_year) and (int(input_month)<=12) and
(int(input_day)<=31):
print()
print()
time.sleep(0.6)
print('*'*27)
time.sleep(1)
print()
# print(f'OK {input_name.title()}')
print(f'OK {username_input_reg.title()}')
print()
time.sleep(1)
print("So your date of birth is:")
time.sleep(0.5)
print(input_year,input_month,input_day,sep='-')
print()
global dob_input,dob_final
dob_input=input_year,input_month,input_day
dob_final=('-'.join(list(dob_input)))
else:
print('⚠OOPS! Seems like there has been some problem in the program,
just wait while we are fixing it.')
def dob():
input_age()
age_check_eligible()
def age_check_eligible():
if (today_year-int(input_year))>=21:
time.sleep(1)
print('𝐘𝐨𝐮 𝐚𝐫𝐞 𝐞𝐥𝐢𝐠𝐢𝐛𝐥𝐞')
print()
10
print('AND')
elif (today_year-int(input_year))<21 and (today_year>0):
time.sleep(1)
print('''𝐁𝐮𝐭 𝐲𝐨𝐮 𝐚𝐫𝐞 𝐧𝐨𝐭 𝐞𝐥𝐢𝐠𝐢𝐛𝐥𝐞 𝐭𝐨 𝐩𝐮𝐫𝐜𝐡𝐚𝐬𝐞 𝐚𝐦𝐦𝐮𝐧𝐢𝐭𝐢𝐨𝐧
𝐢𝐭𝐞𝐦𝐬 𝐲𝐞𝐭
S𝐨 𝐰𝐞 𝐜𝐚𝐧𝐧𝐨𝐭 𝐫𝐞𝐠𝐢𝐬𝐭𝐞𝐫 𝐲𝐨𝐮 𝐚𝐭 𝐭𝐡𝐞 𝐜𝐮𝐫𝐫𝐞𝐧𝐭 𝐦𝐨𝐦𝐞𝐧𝐭, 𝐰𝐞 𝐡𝐨𝐩𝐞 𝐭𝐨
𝐬𝐞𝐞 𝐲𝐨𝐮 𝐬𝐨𝐨𝐧...''')
# *********************************************************************
# usernames_in_db=list(df.username_db.tolist())
username_db_inpy=df.username_db
global usernames_in_db
usernames_in_db=list(username_db_inpy)
def register_fxn():
# cursor.execute('select*from login_db;')
# table_data=cursor.fetchall()
# df=pd.DataFrame(table_data,columns=[1,2,3,4])
def name_input_reg_fxn():
global name_input_reg
name_input_reg=input('Enter your *𝗡𝗔𝗠𝗘* here (maximum 30 characters,
including space):- ')
print()
if name_input_reg:
def username_input_reg_fxn():
global username_input_reg
if check==True:
def password_input_reg_fxn():
11
global password_input_reg
password_input_reg=input('Enter your *𝗣𝗔𝗦𝗦𝗪𝗢𝗥𝗗* here
(max. 30):- ')
print()
if password_input_reg:
dob()
try:
inserting_values_into_db()
except Exception as e:
print(e)
print('⚠OOPS! Seems like an error has occured. We are
trying to fix it.')
elif not password_input_reg:
print('⚠NOTE:You cannot leave it blank.')
print()
print('Please re-enter it.')
print()
password_input_reg_fxn()
password_input_reg_fxn()
elif check==False:
print('⚠USERNAME ALREADY EXISTS')
print()
print('PLEASE TRY AGAIN.')
print()
return username_input_reg_fxn()
username_input_reg_fxn()
elif not name_input_reg:
print('⚠NOTE:You cannot leave it blank.')
print()
12
print('Please re-enter it.')
print()
name_input_reg_fxn()
name_input_reg_fxn()
def inserting_values_into_db():
insert='insert into login_db values(%s,%s,%s,%s);'
vals=(username_input_reg, name_input_reg, dob_final, password_input_reg)
# print(vals)
vals_lst=list(vals)
cursor.execute(insert,vals)
cursor.execute('select*from login_db;')
# for i in cursor:
# print(i)
cursor.fetchall()
sql.commit()
print()
time.sleep(0.6)
print('𝗬𝗼𝘂 𝗮𝗿𝗲 𝘀𝘂𝗰𝗰𝗲𝘀𝘀𝗳𝘂𝗹𝗹𝘆 𝗿𝗲𝗴𝗶𝘀𝘁𝗲𝗿𝗲𝗱.')
print('*'*27)
print()
time.sleep(0.5)
print(f'So, {name_input_reg.title()}\n\nhope you will like our services.')
print()
time.sleep(0.8)
print('Taking you to the main menu')
time.sleep(0.3)
print('.'*5)
time.sleep(0.3)
print('.'*4)
time.sleep(0.3)
print('.'*3)
time.sleep(0.3)
print('.'*2)
time.sleep(0.3)
print('.')
13
mainmenu1()
# *****************************************************************************
def login_fxn():
input_username_log_fxn()
input_password_log_fxn()
def input_username_log_fxn():
global username_input_log
username_input_log=input('Enter your username here(𝐂𝐚𝐬𝐞 𝐬𝐞𝐧𝐬𝐢𝐭𝐢𝐯𝐞):- ')
if username_input_log:
username_input_check_log_fxn()
def username_input_check_log_fxn():
try:
if username_input_log in usernames_in_db:
print()
print('⊱ 𝗘𝗻𝘁𝗲𝗿𝗲𝗱 𝘂𝘀𝗲𝗿𝗻𝗮𝗺𝗲 𝗶𝘀 𝗶𝗻 𝗼𝘂𝘁 𝗱𝗮𝘁𝗮 ⊰')
print()
cursor.execute("SELECT password_db FROM login_db WHERE
username_db=%s", (username_input_log,))
for password_db_inpy in cursor:
password_db_inpy_lst=(list(password_db_inpy))
# didn't convert password_db_inpy directly into string using str()
# because it was being displayed as ( ' d i v 2 0 0 8 ' , )
# which is incomparable to the password_input_log
# print(password_db_inpy_lst)
# print(' '.join(password_db_inpy_lst))
14
# and then into a string using ' '.join()
global final_password_db
final_password_db=' '.join(password_db_inpy_lst)
else:
print()
print('⚠NOTE:𝗘𝗻𝘁𝗲𝗿𝗲𝗱 𝘂𝘀𝗲𝗿𝗻𝗮𝗺𝗲 𝗶𝘀 *𝗻𝗼𝘁* 𝗶𝗻 𝗼𝘂𝗿 𝗱𝗮𝘁𝗮')
print()
reinput_username_fxn()
except Exception as error:
print()
print('⚠NOTE:There might be a problem, We will try to repair it ASAP...')
print('The problem is:- ',error)
def reinput_username_fxn():
print()
reinput_data_choice=input('Do you want to re-enter the details? {yes/no}:-
').lower()
print()
if reinput_data_choice:
if reinput_data_choice=='yes':
input_username_log_fxn()
elif reinput_data_choice=='no':
chose_exit=input('Do you want to exit the program then? {yes/no}:-
').lower()
print()
if chose_exit:
if chose_exit=='yes':
print('🇹🇭🇦🇳🇰 🇾🇴🇺 🇫🇴🇷 🇻🇮🇸🇮🇹🇮🇳🇬 🇺🇸, 🇭🇴🇵🇪 🇼🇪❜🇱🇱 🇸🇪🇪 🇾🇴🇺 🇸🇴🇴🇳...')
sys.exit()
elif chose_exit=='no':
print('Then...')
time.sleep(0.8)
print()
print('Choose from the following:')
print()
def reinput_choice_fxn():
print('•Enter *𝟬* (ZERO) to go to 𝗹𝗼𝗴𝗶𝗻')
15
print()
print('•Enter *𝟬𝟬𝟬* (ZERO(3x)) to go to 𝗲𝘅𝗶𝘁')
print()
global reinput_choice
reinput_choice=input('𝔼𝕟𝕥𝕖𝕣 𝕪𝕠𝕦𝕣 𝕔𝕙𝕠𝕚𝕔𝕖 𝕙𝕖𝕣𝕖:- ')
print()
if reinput_choice:
if reinput_choice=='0':
print('*'*17)
time.sleep(0.8)
print('You chose to 𝗟𝗼𝗴𝗶𝗻')
print()
print('*'*17)
print()
input_username_log_fxn()
elif reinput_choice=='000':
print('*'*17)
time.sleep(0.8)
print('You chose to 𝗲𝘅𝗶𝘁')
print()
print('*'*18)
print()
print('🇹🇭🇦🇳🇰 🇾🇴🇺 🇫🇴🇷 🇻🇮🇸🇮🇹🇮🇳🇬 🇺🇸, 🇭🇴🇵🇪 🇼🇪❜🇱🇱 🇸🇪🇪 🇾🇴🇺 🇸🇴🇴🇳
...')
sys.exit()
else:
print()
print('⚠NOTE:𝐈𝐍𝐕𝐀𝐋𝐈𝐃 input, please try again')
print('\nPlease re-enter your choice.')
time.sleep(0.5)
reinput_choice_fxn()
16
#calling the function normally
reinput_choice_fxn()
else:
print()
print('⚠NOTE:𝗬𝗼𝘂 𝗰𝗮𝗻 𝗼𝗻𝗹𝘆 𝗲𝗻𝘁𝗲𝗿 𝗶𝗻 𝘆𝗲𝘀/𝗻𝗼')
print()
reinput_username_fxn()
else:
print()
print('⚠NOTE:𝗬𝗼𝘂 𝗰𝗮𝗻 𝗼𝗻𝗹𝘆 𝗲𝗻𝘁𝗲𝗿 𝗶𝗻 𝘆𝗲𝘀/𝗻𝗼')
print()
reinput_username_fxn()
def input_password_log_fxn():
global password_input_log
password_input_log=input('Enter your password here(𝐂𝐚𝐬𝐞 𝐬𝐞𝐧𝐬𝐢𝐭𝐢𝐯𝐞):- ')
if password_input_log:
input_password_log_check()
17
print('⚠NOTE:You cannot leave it blank')
input_password_log_fxn()
def input_password_log_check():
if password_input_log==final_password_db:
print()
print('𝗢𝗸, 𝘆𝗼𝘂 𝗮𝗿𝗲 𝗹𝗼𝗴𝗴𝗲𝗱 𝗶𝗻.')
print('*'*21)
cursor.execute('select name from login_db where username_db=%s',
(username_input_log,))
for name_inpy in cursor:
name_inpy_lst=(list(name_inpy))
global final_name
final_name=' '.join(name_inpy_lst)
final_name.title()
print()
print(f"Hey {final_name}, Welcome Back!")
print()
time.sleep(0.6)
print('Taking you to the main menu')
time.sleep(0.3)
print('.'*5)
time.sleep(0.3)
print('.'*4)
time.sleep(0.3)
print('.'*3)
time.sleep(0.3)
print('.'*2)
time.sleep(0.3)
print('.')
18
# cursor.execute("select password_db as username_input from login_db where
username_db=%s",(username_input))
def login_register_screen():
print("━━━━━━⊱ 𝑳𝒐𝒈𝒊𝒏/𝑹𝒆𝒈𝒊𝒔𝒕𝒆𝒓 ⊰━━━━━━")
# time.sleep(0.6)
# making the fxn
def login_register_choice():
print()
# time.sleep(0.8)
print('•Enter *𝟬* (ZERO) to 𝗹𝗼𝗴𝗶𝗻 to your existing account.')
print()
print('•Enter *𝟭* (ONE) to 𝗿𝗲𝗴𝗶𝘀𝘁𝗲𝗿 a new account.')
# time.sleep(1.2)
print()
global login_register_choice_input
login_register_choice_input=input("𝔼𝕟𝕥𝕖𝕣 𝕪𝕠𝕦𝕣 𝕔𝕙𝕠𝕚𝕔𝕖 𝕙𝕖𝕣𝕖:- ")
print()
if login_register_choice_input:
if login_register_choice_input=='0':
print('*'*17)
time.sleep(0.8)
print('You chose 𝗟𝗼𝗴𝗶𝗻')
print()
print('*'*17)
print()
login_fxn()
elif login_register_choice_input=='1':
print('*'*19)
time.sleep(0.8)
print('You chose 𝗥𝗲𝗴𝗶𝘀𝘁𝗲𝗿')
print()
print('*'*19)
register_fxn()
19
else:
print()
print('⚠NOTE:𝐈𝐍𝐕𝐀𝐋𝐈𝐃 input, please try again')
print('\nPlease re-enter your choice.')
time.sleep(0.5)
login_register_choice()
20
ser_armor=pd.Series(["FULL BODY ARMOR","HELMET","BOOTS & GLOVES","EAR
PLUGS","EYE PROTECTOR GLASSES"]
,index=[1,2,3,4,5])
ser_throwables=pd.Series(["GRENADE","SMOKE GRENADE","FLASH
BANG","CHLORINE GAS","TEAR GAS "]
,index=[1,2,3,4,5])
ser_firstaid=pd.Series(["FIRST AID","PAIN KILLER","BETADINE","DOCTOR
TAPE","HEMO-HALT BANDAGE"]
,index=[1,2,3,4,5])
ser_extras=pd.Series(["KNIFE","DAGGER","KARAMBIT","MACHETE","KATANA"]
,index=[1,2,3,4,5])
ser_ammo=pd.Series(["HANDGUN AMMO","ASSAULT RIFLE AMMO","SNIPER RIFLE
AMMO","SHOTGUN AMMO","LMG AMMO","SMG AMMO","HMG AMMO"]
,index=[1,2,3,4,5,6,7])
21
df_sr=pd.DataFrame([["M-24","BARRET M82","AWM","KARABINER-
98K","REMINGTON MSR"],
[80000,800000,630000,120000,1300000],
[18,18,18,18,18],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0]],
index=["GUN NAME","PRICE(₹)","GST(%)","NO OF GUNS
BOUGHT","PRICE W/O GST","PRICE W GST"],
columns=[1,2,3,4,5])
22
index=["GUN NAME","PRICE(₹)","GST(%)","NO OF GUNS
BOUGHT","PRICE W/O GST","PRICE W GST"],
columns=[1,2,3,4,5])
df_throwables=pd.DataFrame([["GRENADE","SMOKE GRENADE","FLASH
BANG","STICKY GRENADE","TEAR GAS "],
[5000,6000,4000,10000,8000],
[18,18,18,18,18],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0]],
index=["ITEM NAME","PRICE(₹)","GST(%)","NO OF ITEMS
BOUGHT","PRICE W/O GST","PRICE W GST"],
columns=[1,2,3,4,5])
23
[1000,200,300,100,1500],
[18,18,18,18,18],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0]],
index=["ITEM NAME","PRICE(₹)","GST(%)","NO OF ITEMS
BOUGHT","PRICE W/O GST","PRICE W GST"],
columns=[1,2,3,4,5])
df_extras=pd.DataFrame([["KNIFE","DAGGER","KARAMBIT","MACHETE","KATANA"
],
[5000,6000,4000,10000,20000],
[18,18,18,18,18],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0]],
index=["ITEM NAME","PRICE(₹)","GST(%)","NO OF ITEMS
BOUGHT","PRICE W/O GST","PRICE W GST"],
columns=[1,2,3,4,5])
df_extras.to_csv(r"C:\Users\Asus\OneDrive\Desktop\AH_df_extras.csv",sep=',')
24
num3=None
var1=None
numm=None
num4=0
num5=0
num6=0
num7=0
num8=0
num9=0
num10=0
num11=0
num12=0
num13=0
num14=0
num15=0
valsubtotal=0
valgst=0
valgstotal=0
def choice():
if num1=="0" :
class_num0()
elif num1=="000":
bill()
elif num1==("00000"):
statistics_choice_fxn()
elif num1=="1" :
class_handguns()
elif num1=="2" :
class_ar()
elif num1=="3" :
class_sr()
elif num1=="4" :
class_shotguns()
elif num1=="5" :
class_lmg()
elif num1=="6" :
class_smg()
elif num1=="7" :
25
class_hmg()
elif num1=="8" :
class_armor()
elif num1=="9" :
class_throwables()
elif num1=="10" :
class_firstaid()
elif num1=="11" :
class_ammo()
elif num1=="12" :
class_extras()
def wanttoexit():
sys.exit(0)
def class_num0():
print("Thank you for your time ")
print("Please visit again")
print("...")
wanttoexit()
def bill():
print("bill")
global df2,ser1,ser2,ser3,ser4,ser5,ser6,ser7,ser8,ser9
global ser10,ser11,ser12,num4,num5,num6,num7,num8,num9
global num10,num11,num12,num13,num14,num15,lst2
26
# print("this is ser_handgun",ser3)
# print("this is ser_handgun",ser4)
# print("this is ser_handgun",ser5)
# print("this is ser_handgun",ser6)
# print("this is ser_handgun",ser7)
# print("this is ser_handgun",ser8)
# print("this is ser_handgun",ser9)
# print("this is ser_handgun",ser10)
# print("this is ser_handgun",ser11)
# print("this is ser_handgun",ser12)
for i in ser1 :
if i==0:
num4+=1
for i in ser2:
if i==0:
num5+=1
for i in ser3 :
if i==0:
num6+=1
for i in ser4:
if i==0:
num7+=1
for i in ser5 :
if i==0:
num8+=1
for i in ser6:
if i==0:
num9+=1
for i in ser7 :
if i==0:
num10+=1
for i in ser8:
if i==0:
num11+=1
for i in ser9 :
if i==0:
num12+=1
for i in ser10:
27
if i==0:
num13+=1
for i in ser11 :
if i==0:
num14+=1
for i in ser12:
if i==0:
num15+=1
print("-"*86)
# The first line codes are basically {cost without gst=(price)*(no. of item) for
each }
# The second line of codes are {cost with gst=(cost without gst)+(gst%)*(cost
without gst)}
df_handguns.iloc[4,:]=(df_handguns.iloc[1,:]*df_handguns.iloc[3,:])
df_handguns.iloc[5,:]=df_handguns.iloc[4,:]+
(df_handguns.iloc[4,:]*(df_handguns.iloc[2,:]/100))
df_ar.iloc[4,:]=(df_ar.iloc[1,:]*df_ar.iloc[3,:])
df_ar.iloc[5,:]=df_ar.iloc[4,:]+(df_ar.iloc[4,:]*(df_ar.iloc[2,:]/100))
df_sr.iloc[4,:]=(df_sr.iloc[1,:]*df_sr.iloc[3,:])
df_sr.iloc[5,:]=df_sr.iloc[4,:]+(df_sr.iloc[4,:]*(df_sr.iloc[2,:]/100))
df_shotguns.iloc[4,:]=(df_shotguns.iloc[1,:]*df_shotguns.iloc[3,:])
df_shotguns.iloc[5,:]=df_shotguns.iloc[4,:]+
(df_shotguns.iloc[4,:]*(df_shotguns.iloc[2,:]/100))
df_lmg.iloc[4,:]=(df_lmg.iloc[1,:]*df_lmg.iloc[3,:])
df_lmg.iloc[5,:]=df_lmg.iloc[4,:]+(df_lmg.iloc[4,:]*(df_lmg.iloc[2,:]/100))
df_smg.iloc[4,:]=(df_smg.iloc[1,:]*df_smg.iloc[3,:])
df_smg.iloc[5,:]=df_smg.iloc[4,:]+(df_smg.iloc[4,:]*(df_smg.iloc[2,:]/100))
df_hmg.iloc[4,:]=(df_hmg.iloc[1,:]*df_hmg.iloc[3,:])
df_hmg.iloc[5,:]=df_hmg.iloc[4,:]+(df_hmg.iloc[4,:]*(df_hmg.iloc[2,:]/100))
df_armor.iloc[4,:]=(df_armor.iloc[1,:]*df_armor.iloc[3,:])
28
df_armor.iloc[5,:]=df_armor.iloc[4,:]+(df_armor.iloc[4,:]*(df_armor.iloc[2,:]/
100))
df_throwables.iloc[4,:]=(df_throwables.iloc[1,:]*df_throwables.iloc[3,:])
df_throwables.iloc[5,:]=df_throwables.iloc[4,:]+
(df_throwables.iloc[4,:]*(df_throwables.iloc[2,:]/100))
df_firstaid.iloc[4,:]=(df_firstaid.iloc[1,:]*df_firstaid.iloc[3,:])
df_firstaid.iloc[5,:]=df_firstaid.iloc[4,:]+
(df_firstaid.iloc[4,:]*(df_firstaid.iloc[2,:]/100))
df_extras.iloc[4,:]=(df_extras.iloc[1,:]*df_extras.iloc[3,:])
df_extras.iloc[5,:]=df_extras.iloc[4,:]+(df_extras.iloc[4,:]*(df_extras.iloc[2,:]/
100))
df_ammo.iloc[4,:]=(df_ammo.iloc[1,:]*df_ammo.iloc[3,:])
df_ammo.iloc[5,:]=df_ammo.iloc[4,:]+(df_ammo.iloc[4,:]*(df_ammo.iloc[2,:]/
100))
#
print(df_handguns,df_ar,df_sr,df_shotguns,df_lmg,df_smg,df_hmg,df_armor,df_thr
owables,df_firstaid,df_extras,df_ammo)
global valsubtotal
global valgst
global valgstotal
if (num4!=5 or num5!=5 or num6!=5 or num7!=5 or num8!=5
or num9!=5 or num10!=5 or num11!=5 or num12!=5 or
num13!=5 or num14!=5 or num15!=7):
if num4!=5 :
dfnew=(df_handguns.T)
for i in range(0,5) :
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" HANDGUNS")
print((dfnew.loc[dfnew["NO OF GUNS BOUGHT"]!=0]).T)
if num5!=5 :
dfnew=(df_ar.T)
29
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" ASSAULT RIFLES")
print((dfnew.loc[dfnew["NO OF GUNS BOUGHT"]!=0]).T)
if num6!=5 :
dfnew=(df_sr.T)
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" SNIPER RIFLE")
print((dfnew.loc[dfnew["NO OF GUNS BOUGHT"]!=0]).T)
if num7!=5 :
dfnew=(df_shotguns.T)
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" SHOTGUNS")
print((dfnew.loc[dfnew["NO OF GUNS BOUGHT"]!=0]).T)
if num8!=5 :
dfnew=(df_lmg.T)
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" LIGHT MACHINE GUNS")
print((dfnew.loc[dfnew["NO OF GUNS BOUGHT"]!=0]).T)
if num9!=5 :
dfnew=(df_smg.T)
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" SUB MACHINE GUNS")
print((dfnew.loc[dfnew["NO OF GUNS BOUGHT"]!=0]).T)
30
if num10!=5 :
dfnew=(df_hmg.T)
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" HEAVY MACHINE GUNS")
print((dfnew.loc[dfnew["NO OF GUNS BOUGHT"]!=0]).T)
if num11!=5 :
dfnew=(df_armor.T)
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" ARMOR")
print((dfnew.loc[dfnew["NO OF ITEMS BOUGHT"]!=0]).T)
if num12!=5 :
dfnew=(df_throwables.T)
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" THROWABLES")
print((dfnew.loc[dfnew["NO OF ITEMS BOUGHT"]!=0]).T)
if num13!=5 :
dfnew=(df_firstaid.T)
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" MED-KIT")
print((dfnew.loc[dfnew["NO OF ITEMS BOUGHT"]!=0]).T)
if num15!=7 :
dfnew=(df_ammo.T)
for i in range(0,7):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" AMMO")
31
print((dfnew.loc[dfnew["NO OF ITEMS BOUGHT"]!=0]).T)
if num14!=5 :
dfnew=(df_extras.T)
for i in range(0,5):
valsubtotal+=dfnew.iloc[i,4]
valgst+=(dfnew.iloc[i,4]*(dfnew.iloc[i,2]/100))
valgstotal+=dfnew.iloc[i,5]
print(" EXTRAS")
print((dfnew.loc[dfnew["NO OF ITEMS BOUGHT"]!=0]).T)
print("SUBTOTAL - ",valsubtotal)
print("GST - ",round(valgst))
print("TOTAL - ",round(valgstotal))
else :
lal()
print(" YOU HAVENT PURCHASED ANYTHING")
lal()
print("TO GO TO MAIN MENU ENTER 00")
lal()
print("TO EXIT THE PROGRAM ENTER 0")
lal()
nummm=input("ENTER HERE - ")
lal()
while i not in ["0","00"] :
lal()
print("SEEMS LIKE YOU MADE A MISTAKE")
lal()
nummm=input("TRY AGAIN - ")
lal()
if nummm=="0":
print("SEE YOU SOON ")
for i in [".",".","."] :
print(i,end="")
time.sleep(.9)
elif nummm=="00" :
for i in [".",".","."] :
print(i,end="")
32
time.sleep(.9)
mainmenu()
def class_handguns():
print("THE PRICE OF THE GUNS ARE LISTED BELOW : ")
time.sleep(1.25)
print()
print((df_handguns.iloc[0:3,:]).T)
lal()
print("ENTER 0 TO EXIT THE PROGRAM ")
lal()
print("ENTER 00 TO GO TO MAIN MENU ")
lal()
print("ENTER 000 TO VIEW THE BILL ")
lal()
print("ENTER YOUR CHOICE OF PURCHASE BY ENTERING THE NO.
CORRESPONGING TO THE ITEM")
lal()
global num2
num2=input("ENTER HERE - ")
while num2 not in ["0","00","000","1","2","3","4","5"]:
print()
print("Looks like you made a mistake ")
num2=input("TRY AGAIN - ")
if num2=="0" :
lal()
print("WE APPRECIATE YOUR TIME")
lal()
print("HOPE YOU VISIT AGAIN")
for i in [".",".","."]:
print(i,end="")
wanttoexit()
elif num2=="00" :
print()
print()
time.sleep(.5)
33
mainmenu()
elif num2=="000":
print()
print()
time.sleep(.5)
bill()
elif num2=="1" :
print()
print()
time.sleep(.5)
class_handgun1()
elif num2=="2" :
print()
print()
time.sleep(.5)
class_handgun2()
elif num2=="3" :
print()
print()
time.sleep(.5)
class_handgun3()
elif num2=="4" :
print()
print()
time.sleep(.5)
class_handgun4()
elif num2=="5" :
print()
print()
time.sleep(.5)
class_handgun5()
#********************************************************************************
*****
def class_handgun1():
print("HOW MANY GLOCK-17 YOU WANT TO BUY")
time.sleep(1)
print()
print("NOTE : YOU CAN ONLY BUY A MAXIMUM OF 50 ITEMS PER VISIT")
global numm
34
print()
numm=input("ENTER HOW MANY YOU WANT TO BUY - ")
global df_handguns
while numm not in lstchk50 :
print("YOU DID NOT ENTER VALUES BETWEEN 0 AND 50 ")
print()
time.sleep(1)
numm=input("TRY AGAIN - ")
df_handguns.iloc[3,0]=int(numm)
lal()
print("TO CHANGE THE NO. OF GLOCK-17 BOUGHT PRESS 1")
lal()
35
print("TO GO TO EXTRAS SUBMENU ENTER 0000")
lal()
print("TO VIEW THE BILL ENTER 000")
lal()
numm1=input("ENTER HERE - ")
if numm1 not in ["0","00","000","0000","1"]:
print()
time.sleep(.5)
print("LOOKS LIKE YOU MADE A MISTAKE ")
print()
time.sleep(.75)
numm1=input("TRY AGAIN - ")
if numm1=="1":
lal()
class_extras5()
elif numm1=="0" :
lal()
lisst=["WE ","HOPE ","YOU ","LIKED ","OUR ","SERVICE"]
lisst1=["AND ","WILL ","VISIT ","AGAIN "]
lisst2=[".",".","."]
for i in lisst :
print(i,end="")
time.sleep(.5)
for i in lisst1 :
print(i,end="")
time.sleep(.5)
for i in lisst2 :
print(i,end="")
time.sleep(.5)
wanttoexit()
elif numm1=="00":
lal()
mainmenu()
elif numm1=="000":
lal()
bill()
elif numm1=="0000" :
lal()
class_extras()
36
def mainmenu1():
#print("Welcome to AMMO HAVEN")
lal()
instr=["➳ ","Oᴜʀ ","sᴇʀᴠɪᴄᴇs ","ᴀʀᴇ ","ʟɪsᴛᴇᴅ ","ʙᴇʟᴏᴡ"]
for i in instr:
time.sleep(0.16)
print(i,end='')
time.sleep(0.75)
lal()
print(" 𝗛𝗔𝗡𝗗𝗚𝗨𝗡𝗦")
print("")
print(ser_handguns.to_string())
print("")
time.sleep(0.4)
print("")
print(" 𝗔𝗦𝗦𝗔𝗨𝗟𝗧 𝗥𝗜𝗙𝗟𝗘𝗦")
print("")
print(ser_ar.to_string())
print("")
time.sleep(0.35)
print("")
print(" 𝗦𝗡𝗜𝗣𝗘𝗥 𝗥𝗜𝗙𝗟𝗘𝗦")
print("")
print(ser_sr.to_string())
print("")
print("")
print(" 𝗦𝗛𝗢𝗧𝗚𝗨𝗡𝗦")
print("")
print(ser_shotguns.to_string())
print("")
print("")
print(" 𝗟𝗜𝗚𝗛𝗧 𝗠𝗔𝗖𝗛𝗜𝗡𝗘 𝗚𝗨𝗡𝗦")
print("")
print(ser_lmg.to_string())
print("")
time.sleep(0.35)
print("")
print(" 𝗦𝗨𝗕 𝗠𝗔𝗖𝗛𝗜𝗡𝗘 𝗚𝗨𝗡𝗦")
37
print("")
print(ser_smg.to_string())
print("")
time.sleep(0.35)
print("")
print(" 𝗛𝗘𝗔𝗩𝗬 𝗠𝗔𝗖𝗛𝗜𝗡𝗘 𝗚𝗨𝗡𝗦")
print("")
print(ser_hmg.to_string())
print("")
time.sleep(0.35)
print("")
print(" 𝗔𝗥𝗠𝗢𝗥")
print("")
print(ser_armor.to_string())
print("")
time.sleep(0.35)
print("")
print(" 𝗧𝗛𝗥𝗢𝗪𝗔𝗕𝗟𝗘𝗦")
print("")
print(ser_throwables.to_string())
print("")
time.sleep(0.35)
print("")
print(" 𝗠𝗘𝗗-𝗞𝗜𝗧")
print("")
print(ser_firstaid.to_string())
print("")
time.sleep(0.35)
print("")
print(" 𝗔𝗠𝗠𝗢")
print("")
print(ser_ammo.to_string())
print("")
time.sleep(0.35)
print("")
print(" 𝗘𝗫𝗧𝗥𝗔𝗦")
#time.sleep(0.35)
print("")
print(ser_extras.to_string())
38
print("")
time.sleep(0.35)
print()
print('*'*80)
time.sleep(1)
print()
instr=["➳ ","Eɴᴛᴇʀ ","ʏᴏᴜʀ"," ᴄʜᴏɪᴄᴇ ","ᴏғ ","ᴘᴜʀᴄʜᴀsᴇ ","ʙʏ ","ᴇɴᴛᴇʀɪɴɢ ",
"ᴛʜᴇ ","ɴᴜᴍʙᴇʀ ","ᴄᴏʀʀᴇsᴘᴏɴᴅɪɴɢ ","ᴛᴏ ","ᴛʜᴇ ","ɪᴛᴇᴍ"]
for i in instr:
time.sleep(.16)
print(i,end="")
lal()
print("1.HANDGUNS")
lal()
print("2.ASSAULT RIFLES")
lal()
print("3.SNIPER RIFLES")
lal()
print("4.SHOTGUNS")
lal()
print("5.LIGHT MACHINE GUNS")
lal()
print("6.SUB MACHINE GUNS")
lal()
print("7.HEAVY MACHINE GUNS")
lal()
print("8.ARMOR")
lal()
print("9.THROWABLES")
lal()
print("10.MED KIT")
lal()
print("11.AMMO")
lal()
print("12.EXTRAS")
lal()
print("•FOR EXAMPLE: ENTER *𝟭* FOR 𝗛𝗮𝗻𝗱𝗴𝘂𝗻𝘀")
lal()
print("•TO EXIT THE SHOP ENTER *𝟬* (ZERO)")
39
lal()
print("•TO GO TO THE BILL ENTER *𝟬𝟬𝟬* ((ZERO)x3)")
lal()
print("•TO VIEW OUR STATISTICS ENTER *𝟬𝟬𝟬𝟬𝟬* ((ZERO)x5)")
lal()
print("𝗡𝗢𝗧𝗘: YOU CAN ONLY BUY A MAXIMUM OF 50 ITEMS PER VISIT")
global num1
lal()
num1=input("ENTER THE NUMBER HERE - ")
while num1 not in ["0","1","2","3","4","5","6","7",
"8","9","10","11","12","000","00000"]:
lal()
print("Seems like you made a mistake")
lal()
num1=input("TRY AGAIN - ")
choice()
def mainmenu():
#print("Welcome to AMMO HAVEN")
print('➳ Oᴜʀ sᴇʀᴠɪᴄᴇs ᴀʀᴇ ʟɪsᴛᴇᴅ ʙᴇʟᴏᴡ')
print()
print(" 𝗛𝗔𝗡𝗗𝗚𝗨𝗡𝗦")
print("")
print(ser_handguns.to_string())
print("")
print("")
print(" 𝗔𝗦𝗦𝗔𝗨𝗟𝗧 𝗥𝗜𝗙𝗟𝗘𝗦")
print("")
print(ser_ar.to_string())
print("")
print("")
print(" 𝗦𝗡𝗜𝗣𝗘𝗥 𝗥𝗜𝗙𝗟𝗘𝗦")
print("")
print(ser_sr.to_string())
print("")
print("")
print(" 𝗦𝗛𝗢𝗧𝗚𝗨𝗡𝗦")
print("")
40
print(ser_shotguns.to_string())
print("")
print("")
print(" 𝗟𝗜𝗚𝗛𝗧 𝗠𝗔𝗖𝗛𝗜𝗡𝗘 𝗚𝗨𝗡𝗦")
print("")
print(ser_lmg.to_string())
print("")
print("")
print(" 𝗦𝗨𝗕 𝗠𝗔𝗖𝗛𝗜𝗡𝗘 𝗚𝗨𝗡𝗦")
print("")
print(ser_smg.to_string())
print("")
print("")
print(" 𝗛𝗘𝗔𝗩𝗬 𝗠𝗔𝗖𝗛𝗜𝗡𝗘 𝗚𝗨𝗡𝗦")
print("")
print(ser_hmg.to_string())
print("")
print("")
print(" 𝗔𝗥𝗠𝗢𝗥")
print("")
print(ser_armor.to_string())
print("")
print("")
print(" 𝗧𝗛𝗥𝗢𝗪𝗔𝗕𝗟𝗘𝗦")
print("")
print(ser_throwables.to_string())
print("")
print("")
print(" 𝗠𝗘𝗗-𝗞𝗜𝗧")
print("")
print(ser_firstaid.to_string())
print("")
print("")
print(" 𝗔𝗠𝗠𝗢")
print("")
print(ser_ammo.to_string())
print("")
print("")
print(" 𝗘𝗫𝗧𝗥𝗔𝗦")
41
print("")
print(ser_extras.to_string())
print("")
print()
print('*'*80)
time.sleep(1)
print()
print('➳ Eɴᴛᴇʀ ʏᴏᴜ ᴄʜᴏɪᴄᴇ ᴏғ ᴘᴜʀᴄʜᴀsᴇ ʙʏ ᴇɴᴛᴇʀɪɴɢ ᴛʜᴇ ɴᴜᴍʙᴇʀ ᴄᴏʀʀᴇsᴘᴏɴᴅɪɴɢ ᴛᴏ ᴛʜᴇ
ɪᴛᴇᴍ')
print()
print("1.HANDGUNS")
print()
print("2.ASSAULT RIFLES")
print()
print("3.SNIPER RIFLES")
print()
print("4.SHOTGUNS")
print()
print("5.LIGHT MACHINE GUNS")
print()
print("6.SUB MACHINE GUNS")
print()
print("7.HEAVY MACHINE GUNS")
print()
print("8.ARMOR")
print()
print("9.THROWABLES")
print()
print("10.MED KIT")
print()
print("11.AMMO")
print()
print("12.EXTRAS")
print()
print("•FOR EXAMPLE: ENTER *𝟭* FOR 𝗛𝗮𝗻𝗱𝗴𝘂𝗻𝘀")
print()
print("•TO EXIT THE SHOP ENTER *𝟬* (ZERO)")
print()
print("•TO GO TO THE BILL ENTER *𝟬𝟬𝟬* ((ZERO)x3)")
42
print()
print("•TO VIEW OUR STATISTICS ENTER *𝟬𝟬𝟬𝟬𝟬* ((ZERO)x5)")
print()
print("𝗡𝗢𝗧𝗘: YOU CAN ONLY BUY A MAXIMUM OF 50 ITEMS PER VISIT")
print()
global num1
num1=input("ENTER HERE - ")
while num1 not in ["0","1","2","3","4","5","6","7",
"8","9","10","11","12","000","00000"]:
def statistics_choice_fxn():
def graph_1():
years = [2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023]
market_size = [8.1, 9.2, 10.5, 12.0, 13.3, 14.6, 16.5, 18.0, 19.5, 21.0]
plt.figure(figsize=(10, 6))
plt.plot(years, market_size, marker='o', color='b', linestyle='-', linewidth=2,
markersize=8)
plt.title('Ammunition Market Size Growth (2014–2023)', fontsize=14)
plt.xlabel('Year', fontsize=12)
plt.ylabel('Market Size (USD in billions)', fontsize=12)
plt.grid(True)
plt.show()
def graph_2():
years = [2018, 2019, 2020, 2021, 2022, 2023, 2024]
handguns_sales = [150, 180, 210, 250, 270, 300, 320]
rifles_sales = [120, 140, 160, 200, 230, 260, 280]
shotguns_sales = [80, 90, 100, 130, 160, 180, 200]
submachine_guns_sales = [30, 40, 50, 60, 80, 90, 100]
bar_width = 0.15
index = np.arange(len(years))
plt.figure(figsize=(10, 6))
43
plt.bar(index - 1.5*bar_width, handguns_sales, bar_width, label='Handguns',
color='blue')
plt.bar(index - 0.5*bar_width, rifles_sales, bar_width, label='Rifles',
color='green')
plt.bar(index + 0.5*bar_width, shotguns_sales, bar_width, label='Shotguns',
color='orange')
plt.bar(index + 1.5*bar_width, submachine_guns_sales, bar_width,
label='Machine Guns', color='red')
def graph_3():
years = np.arange(2014, 2024)
a = 1000
b = 0.15
sales = a * np.exp(b * (years - 2014))
plt.figure(figsize=(10, 6))
plt.plot(years, sales, marker='o', linestyle='-', color='b', label='Sales of
Ammo-Haven')
plt.title('Exponential Growth in Sales of Ammo-Haven (2014-2023)',
fontsize=14)
plt.xlabel('Year', fontsize=12)
plt.ylabel('Sales (Units)', fontsize=12)
plt.grid(True)
plt.legend()
plt.tight_layout()
plt.show()
print()
print('Enter *𝟬* (ZERO) to view ᴀᴍᴍᴜɴɪᴛɪᴏɴ ᴍᴀʀᴋᴇᴛ ꜱɪᴢᴇ ɢʀᴏᴡᴛʜ')
print()
44
print('Enter *𝟬𝟬* ((ZERO)x2) to view ꜱᴀʟᴇꜱ ᴏꜰ ᴅɪꜰꜰᴇʀᴇɴᴛ ɢᴜɴꜱ ᴡᴏʀʟᴅᴡɪᴅᴇ (2018-
2024)')
print()
print('Enter *𝟬𝟬𝟬* ((ZERO)x3) to view ᴇxᴘᴏɴᴇɴᴛɪᴀʟ ɢʀᴏᴡᴛʜ ɪɴ ꜱᴀʟᴇꜱ ᴏꜰ ᴀᴍᴍᴏ-ʜᴀᴠᴇɴ
(2014-2023) ')
print()
special_thanks()
co_founders()
intro()
login_register_screen()
# mainmenu1() # has lal() i.e. time.sleeps
# mainmenu() # had no time gap
45