0% found this document useful (0 votes)
10 views54 pages

Project Maulik

Uploaded by

rockybeast8867
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views54 pages

Project Maulik

Uploaded by

rockybeast8867
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Air Force Golden Jubilee Institute

THE FUTURZ ARCADE


Computer Science Project
2024-25
by
Maulik Pandey | XII-B
1
Contents
S. No. Topics Page No.
1 Certificate 1

2 Acknowledgement 2

3 Introduction 3

4 Flow of Program 5

5 Hardware/Software 6
Requirements
6 Modules Used 7

7 Source Code 8

8 Output 31

9 Bibliography 50

10 Scope of improvement 51
Certificate
This is to confirm that Maulik Pandey,
student in class XII-B at the Air Force
Golden Jubilee Institute in Subroto Park,
New Delhi, completed and successfully
turned in this unique Computer Science
project.

This project’s content is unique and wasn’t


plagiarised from any other source. It was
created under the direction of Computer
Science instructor Ms Mohini Arora.

Ms Mohini Arora
(Lecturer: Computer Science)

1
Achnowledgement

I would like to thank Ms Mohini Arora, our
instructor, for all of her support, wise
advice, and mentoring. I also want to express my
gratitude to Mrs Alka Singh-the Principal, and
Mrs Rashmi Soota-the Vice-Principal for giving
me this amazing chance to participate in the
computer project The Futurz Arcade.
I also want to thank my friends and parents
for their assistance with this effort. I also
appreciate Mr. Surender Singh, the attendent of
the computer science lab, for his assistance.
I completed this assignment to increase my
technical skills in addition to earning marks. I
hope that the many useful skills I gained during
this project will be useful in my future career.

Maulik Pandey
(XII-B)

2
What is it?
The Futurz Arcade is an innovative E-Arcade that
offers a dynamic gaming experience through two
distinct modes: Player and Employee. In this virtual
realm, pixels come to life, blending seamlessly with
excitement to create an unparalleled environment
for both gaming and platform management.
In Player Mode, users are greeted by the captivating
neon glow of The Futurz Arcade, where they can
explore a rich array of options. A sophisticated
login and signup system ensures a smooth entry into
the arcade, where players can dive into immersive
games, manage their profiles, add credits to their
accounts, or visit the Item-Shop for exciting in-
game purchases.
Players can choose from a variety of thrilling
games: challenge their knowledge in “Arround the
World...Quizzzz,” test strategy and luck in “The
Rockz - The Paperz - The Scissorz,” roll the dice
in “Dice-n-Score,” or solve mind-bending puzzles
in “Riddlerr.” Each game is designed to provide an
engaging and unique adventure, offering endless
entertainment.
In Employee Mode, users take on the role of platform
moderators, with exclusive access to a suite of
administrative tools. Employees have the ability
to manage community interactions by banning or
unbanning players when necessary, ensuring a safe
and respectful gaming environment. Additionally,
they can view and analyze player data, either
selectively or for all users, giving them efficient
3
control over the platform’s operations.
The Futurz Arcade allows us to store all the data
of the players in a binary format. This makes
the process of carrying out player management in
a easier manner so that all of our employees can
have less pressure on them, managing the data of
the players.
Whether you’re enjoying the arcade as a Player or
ensuring its smooth operation as an Employee, The
Futurz Arcade combines technology with exciting
gameplay and comprehensive management tools.
Prepare to immerse yourself in a digital
odyssey where the future of gaming and platform
moderation unfolds at your fingertips.

4
The Flowww

5
Hardware/Software
Requirements
Minimum System requirements:
• 2 GHz CPU speed
• 2 GB of RAM
• 15 GB of free hard-disk space
• 1024 x 768 or higher resolution display

Recomended System Requirements:


• Modern Operating System:
a)Windows 7 or higher
b)Mac OS X 10.11 or higher, 64-bit
c)Linux: RHEL 6/7, 64-bit (almost all
libraries also work in Ubuntu)
• x86 64-bit CPU (Intel / AMD architecture). ARM
CPUs are not supported.
• 4 GB RAM
• 5 GB free disk space

PS: The system must have the latest version of


python installed with all the built-in modules in
the pythone library

6
Modules Used
The following modules have been used to make
this program of The Futurz Arcade:

Built-in modules:
1. random
• choices() (Returns a randomly selected element from
the specified sequence)

2. pickle
• dump() (Writes the provided data in the specified
binary file)

• load() (Reads the data of the specified binary file


and returns that data in the object specified)

User-Defined Functions:
1. player_id() (Generates a randomised Player-ID)

2. user_password() (Generates a randomised password for


the user)

3. display_playerdetails() (displays all the


details of the player by
taking all the credentials
as arguments)

7
import random
Source Code
import pickle
B=open(“FuturzBanned.bin”, ‘ab’)
B.close()
E=open(“FuturzBanned.bin”, ‘ab’)
E.close()
F=open(“Futurz Arcade DB.bin”, ‘ab’)
F.close()
def player_id():
return ‘’.join(random.choices(‘1234567890abcdefghjiklmnopqrstuvwxyz’,
k=7))

def user_password():
return ‘’.join(random.
choices(‘ABCDEFGHIJKLMNOPQRSTUVWXYZ@#*1234567890’, k=5))

def display_
playerDetails(password,name,age,playerid,credit,score,Litems):
print()
print(‘...Player Details...’)
print(‘Player-ID:’, playerid)
print(‘User password:’, password)
print(‘Name:’, name)
print(‘Age:’, age)
print(‘Current credit amount:’, credit)
print(‘Current Score:’, score)
print(‘Items Owned: ‘, end=’’)
if Litems!=[]:
k=’’
L=[]
for i in Litems:

8
if i!=k:
k=i
L.append(i)
for j in L:
if j==L[-1]:
print(j)
else:
print(j,end=’,’)
else:
print(“None”)
print()

#Maulik_3k32vqo_OI7NO
#Garv_2ei4qrs_@69*U
#Adil_08hsiku_VO8QP
#Aditi_ys05efx_SSVY2
#Satyam Kumar_08sstku_AL0SK

######Only UDFs and Default settings above, rest below######

Litems=[]
Ldetails=[] #[0playerID,1name,2age,3credit_amount,4score_
points,5Litems]
#Ddetails={} #{password:[PlayerID,name,age,credit_amount,score_
points,Litems]}

exit=False
while not exit:
print()
print(‘\t==========WELCOME TO THE FUTURZ ARCADE==========’)
usertype=int(input(‘’’So, are you a player or an employee of the
arcade?
1...Player
2...Employee
9
So, what is your User-Type?(1 or 2): ‘’’))
while usertype==1: #Player Mode
while True: #Log In/Sign Up
print(‘!WELCOME PLAYER!’)
print(‘’’So, if you’re new then Sign Up and if you are coming
back, then Log In...
1...Sign Up
2...Log In’’’)
ch=int(input(“So, what’s it going to be?(1 or 2) “))
if ch==1: #Sign Up
print(“Welcome! Let’s get you registered...”)
password=user_password()
playerID=player_id()
Ldetails.append(playerID)
name=input(‘Enter your name: ‘)
Ldetails.append(name)
age=int(input(‘Enter your age: ‘))
Ldetails.append(age)
credit_amount = 1000
Ldetails.append(credit_amount)
score_points=0
Ldetails.append(score_points)
Litems=[]
Ldetails.append(Litems)
display_playerDetails(password,name,age,playerID,credit_
amount,score_points,Litems)
with open(“Futurz Arcade DB.bin”, ‘rb’) as F:
Ddetails=pickle.load(F)
Ddetails[password]=Ldetails
with open(“Futurz Arcade DB.bin”, ‘wb’) as F:
pickle.dump(Ddetails, F)
break

elif ch==2: #Log In


with open(‘FuturzBanned.bin’, ‘rb’) as B:

10
Dbanned=pickle.load(B)
with open(‘Futurz Arcade DB.bin’, ‘rb’) as F:
Ddetails=pickle.load(F)
print(“Welcome back! We’re so glad to see you again...”)
loggedin=False
while True:
loginID=input(‘Enter your Player-ID: ‘)
loginPass=input(‘Enter your Password: ‘)
if loginPass not in Ddetails:
print(“Nah, that’s the wrong password. Taking
you back...”)
break
elif loginPass in Ddetails and Ddetails[loginPass]
[0]!=loginID:
print(“Nah, that’s the wrong Player-ID. Taking
you back...”)
break
elif loginPass in Dbanned:
print(‘’’Your profile is banned on the Futurz
Arcade.
Please contact the admins for further
details.
taking you back to sign-up page...’’’)
ch=0
break
else:
password=loginPass
playerID=Ddetails[password][0]
name=Ddetails[password][1]
age=Ddetails[password][2]
credit_amount=Ddetails[password][3]
score_points=Ddetails[password][4]
Litems=Ddetails[password][5]
with open(‘Futurz Arcade DB.bin’, ‘wb’) as F:
pickle.dump(Ddetails, F)
print(‘That is correct. Logging you in...’)

11
loggedin=True
break
if loggedin==True:
break

while True: #Arcade Menu


print()
print(‘’’Now, you can do the following things...
1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type’’’)
ch=int(input(“so. what is it going to be?(1-6) “))

if ch==1: #Gamesss
print()
print(‘’’Choose out of the following games to play:
1...Arround the World..Quizzzz
2...The Rockz - The Paperz - The Scissorz
3...Dice-n-Score
4...Riddlerr
PS: Each game costs 100 Credits
‘’’)
ch=int(input(‘Enter your game choice(1-4): ‘))
if ch==1: #Quiz
print()
if credit_amount >= 100:
credit_amount-=100
else:
print(“Sorry but you don’t have the required
amount of credits to play this game”)
break

12
print(‘\t Welcome to “Arround the World...Quizzzz”’)
print(‘’’The rules are simple...anser the question
and one correct answer gets you 50 points’’’)
input(‘Press Enter to start...’)
print()
Q1=int(input(‘’’Ques.1...What is the capital of
Russia?

1...St. Petersburg
2...Moscow
3...Ukrain
4...Tel Aviv

What is your answer?(1-4) ‘’’))


if Q1==2:
score_points+=50
print(‘That is correct! You get 50 points’)
else:
print(‘Sorry but that one is not the answer. The
correct answer is “Moscow”’)
print()
Q2=int(input(‘’’Ques.2...Which country is also known
as the land of Rising-Sun?

1...Japan
2...China
3...North Korea
4...Combodia

What is your answer?(1-4) ‘’’))


if Q2==1:
score_points+=50
print(‘That is correct! You get 50 points’)
else:
print(‘Sorry but that one is not the answer. The
correct answer is “Japan”’)

13
print()
Q3=int(input(‘’’Ques.3...The capital of Italy is?

1...Venice
2...Florence
3...Rome
4...Naples

What is your answer?(1-4) ‘’’))


if Q3==3:
score_points+=50
print(‘That is correct! You get 50 points’)
else:
print(‘Sorry but that one is not the answer. The
correct answer is “Rome”’)
print()
Q4=int(input(‘’’Ques.4...Which river flows through
London?

1...Severn
2...Trent
3...Thames
4...Great Ouse

What is your answer?(1-4) ‘’’))


if Q4==3:
score_points+=50
print(‘That is correct! You get 50 points’)
else:
print(‘Sorry but that one is not the answer. The
correct answer is “Thames”’)
print()
Q5=int(input(‘’’Ques.5...How tall is Mt. Everest?

1...8,842 m
2...7,849 m
14
3...6,849 m
4...9,849 m

What is your answer?(1-4) ‘’’))


if Q5==1:
score_points+=50
print(‘That is correct! You get 50 points’)
else:
print(‘Sorry but that one is not the answer. The
correct answer is “8,842 m”’)
print()
Q6=int(input(‘’’Ques.6...Which is the smallest
country in the world?

1...Andorra
2...India
3...Maldives
4...Vatican City

What is your answer?(1-4) ‘’’))


if Q6==4:
score_points+=50
print(‘That is correct! You get 50 points’)
else:
print(‘Sorry but that one is not the answer. The
correct answer is “Vatican City”’)
print()
Q7=int(input(‘’’Ques.7...How many countries are
there in the world?

1...195
2...145
3...105
4...245

What is your answer?(1-4) ‘’’))

15
if Q7==1:
score_points+=50
print(‘That is correct! You get 50 points’)
else:
print(‘Sorry but that one is not the answer. The
correct answer is “195”’)
print()
Q8=int(input(‘’’Ques.8...Which of the following
countries is in Asia?

1...Mongolia
2...Russia
3...Scotland
4...Brazil

What is your answer?(1-4) ‘’’))


if Q8==1:
score_points+=50
print(‘That is correct! You get 50 points’)
else:
print(‘Sorry but that one is not the answer. The
correct answer is “Mongolia”’)
with open(‘Futurz Arcade DB.bin’, ‘rb’) as F:
Ddetails=pickle.load(F)
Ddetails[password][4]=score_points
with open(“Futurz Arcade DB.bin”, ‘wb’) as F:
pickle.dump(Ddetails, F)
print(‘’’And that’s where we finish.’’’)

elif ch==2: #Rock Paper Scissor


while True:
print()
if credit_amount >= 100:
credit_amount-=100
else:
print(“Sorry but you don’t have the required
16
amount of credits to play this game”)
break
print(‘’’\t Welcome to “The Rockz - The Paperz -
The Scissorz”
Here, you get 100 score points if you win a
round.’’’)
print(‘’’
1--Rock
2--Paper
3--Scissor’’’)
player=int(input(‘Choose your move(1,2,3): ‘))
if player==1:
player=’Rock’
elif player==2:
player=’Paper’
elif player==3:
player=’Scissor’
bot=random.choice([‘Rock’, ‘Paper’, ‘Scissor’])
print(‘You chose’, player,’and we chose’, bot)
if player==bot:
print(‘Thats a DRAW, no points given’)
elif player==’Rock’ and bot==’Scissor’:
print(‘You won this round and 100 points’)
score_points+=100
elif player==’Paper’ and bot==’Rock’:
print(‘You won this round and 100 points’)
score_points+=100
elif player==’Scissor’ and bot==’Paper’:
print(‘You won this round and 100 points’)
score_points+=100
else:
print(‘Sorry...you lost that one, so no
points given.’)
with open(‘Futurz Arcade DB.bin’, ‘rb’) as F:
Ddetails=pickle.load(F)
Ddetails[password][4]=score_points
17
with open(“Futurz Arcade DB.bin”, ‘wb’) as F:
pickle.dump(Ddetails, F)
ch=int(input(‘Another shot?(1--Yes/2--No): ‘))
if ch==1:
print(“Alright, another 100 credits will be
charged”)
elif ch==2:
break

elif ch==3: #Dice-n-Score


while True:
print()
if credit_amount >= 100:
credit_amount-=100
else:
print(“Sorry but you don’t have the required
amount of credits to play this game”)
break
print(‘\t Welcome to “Dice-n-Score”’)
input(‘’’INSTRUCTIONS:
You will be throwing a dice and whatever is the
number that comes up,
the 10 times of that number will be added up to
you score unless it is a “1”.
If a “1” comes up, that’s where the game endes.
Press Enter to start...
‘’’)
dice=random.choice([2,3,4,5,6])
print(‘The dice rolled a’, dice)
score_points+=(dice*10)
input(“Press Enter to roll again”)
while True:
dice=random.choice([1,2,3,4,5,6])
if dice != 1:
print()
print(‘The dice rolled a’, dice)

18
score_points+=(dice*10)
input(“Press Enter to roll again”)
else:
print(“Sorry, but the dice rolled a ‘1’
so that’s where this round ends”)
break
with open(‘Futurz Arcade DB.bin’, ‘rb’) as F:
Ddetails=pickle.load(F)
Ddetails[password][4]=score_points
with open(“Futurz Arcade DB.bin”, ‘wb’) as F:
pickle.dump(Ddetails, F)

ch=int(input(“Another round?(1...Yes/2...No)”))
if ch==1:
print(“Alright, another 100 credits will be
charged”)
elif ch==2:
break

elif ch==4: #Riddlerr


print()
if credit_amount >= 100:
credit_amount-=100
else:
print(“Sorry but you don’t have the required
amount of credits to play this game”)
break
print(‘\t Welcome to “Riddlerr”’)
input(‘’’The rules are simple for this one too...
based on the hint given to you, just guess the correct answer to it.
One correct answer gives you 50 points.

Press Enter to start’’’)


Q1=input(‘’’Ques.1...A ‘5’ letter word that becomes
shorter when you add ‘2’ letters in it.
Your answer:’’’)

19
if Q1.lower()==”shorter”:
print(‘That is correct! And there goes 50 points
to you.’)
score_points+=50
else:
print(‘Nah, the correct one is “Shorter”’)

Q2=input(‘’’Ques.2...People buy me to eat but never


eat me.
Your answer:’’’)
if Q2.lower()==”plate”:
print(‘That is correct! And there goes 50 points
to you.’)
score_points+=50
else:
print(‘Nah, the correct one is “Plate”’)

Q3=input(‘’’Ques.3...Which vehicle is spelled the


same backwards
Your answer:’’’)
if Q3.lower()==”racecar”:
print(‘That is correct! And there goes 50 points
to you.’)
score_points+=50
else:
print(‘Nah, the correct one is “Racecar”’)

Q4=input(‘’’Ques.4...I shave everyday, but my beard


stays the same. Who am I?
Your answer:’’’)
if Q4.lower()==”barber”:
print(‘That is correct! And there goes 50 points
to you.’)
score_points+=50
else:
print(‘Nah, the correct one is “Barber”’)

20
Q5=input(‘’’Ques.5...I am always in front of you,
yet you can’t see me. Who am I?
Your answer:’’’)
if Q5.lower()==”future”:
print(‘That is correct! And there goes 50 points
to you.’)
score_points+=50
else:
print(‘Nah, the correct one is “Future”’)

with open(‘Futurz Arcade DB.bin’, ‘rb’) as F:


Ddetails=pickle.load(F)
Ddetails[password][4]=score_points
with open(“Futurz Arcade DB.bin”, ‘wb’) as F:
pickle.dump(Ddetails, F)

print(‘And we come to an end...’)

elif ch==2: #Player Details


print()
display_playerDetails(password, name, age, playerID,
credit_amount, score_points, Litems)

elif ch==3: #Add Credits


print()
print(‘’’To add more credits to your account,
you will have to buy it.
50 Credit-Points = Rs.100’’’)
buyCredit=int(input(‘How many credits points do you want
to buy?: ‘))
card_number=input(‘Enter your card number: ‘) #2223
0000 4841 0010
card_exp=input(‘Enter expiry of card(MMYY)’) #0926
card_owner=input(“Enter card owner name: “) #Maulik
Pandey
card_cvv=int(input(‘Enter CVV: ‘)) #208

21
print(‘Alright, we will charge you Rs.’, buyCredit*2,
‘for’, buyCredit, ‘credit amount.’)
credit_amount+=buyCredit
with open(“Futurz Arcade DB.bin”, “rb”) as F:
Ddetails=pickle.load(F)
Ddetails[password][3]=credit_amount
with open(“Futurz Arcade DB.bin”, ‘wb’) as F:
pickle.dump(Ddetails, F)
print(‘Payment Completed! Your current credit balance
is’, credit_amount)

elif ch==4: #Store


print()
print(‘Welcome to the Shop!’)
while True:
print(‘’’You can have the following stuff based on
how many points you have scored

1...Glow-in-the-dark stickers (500 points)


2...Mini handheld game console (1000 points)
3...Funky sunglasses (750 points)
4...LED light-up fidget spinner (800 points)
5...Air Force-themed keychain (600 points)
6...Graphic design sketchbook (120 points)
7...Super bouncy rubber ball set (400 points)
8...Colorful headphones (900 points)
9...The FUTURZ ARCADE exclusive T-shirt (150 points)
10...Cool holographic stickers pack (550 points)’’’)
print()
ch=int(input(‘So, what are you goind to buy?(1-10)
‘))
if ch==1:
if score_points<500:
print(“Sorry but you don’t have enough
points to buy this item.”)
else:

22
print(“You just bought a ‘Glow-in-the-dark
stickers’ for 500 points”)
Litems.append(“Glow-in-the-dark stickers”)
score_points-=500
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:
break
elif ch==2:
if score_points<1000:
print(“Sorry but you don’t have enough
points to buy this item.”)
else:
print(“You just bought a ‘Mini handheld game
console’ for 1000 points”)
Litems.append(“Mini handheld game console”)
score_points-=1000
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:
break
elif ch==3:
if score_points<750:
print(“Sorry but you don’t have enough
points to buy this item.”)
else:
print(“You just bought a ‘Funky sunglasses’
for 750 points”)
Litems.append(“Funky sunglasses”)
score_points-=750
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:
break
elif ch==4:
if score_points<800:
print(“Sorry but you don’t have enough
points to buy this item.”)

23
else:
print(“You just bought a ‘LED light-up fidget
spinner’ for 800 points”)
Litems.append(“LED light-up fidget spinner”)
score_points-=800
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:
break
elif ch==5:
if score_points<600:
print(“Sorry but you don’t have enough
points to buy this item.”)
else:
print(“You just bought a ‘Air Force-themed
keychain’ for 600 points”)
Litems.append(“Air Force-themed keychain”)
score_points-=600
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:
break
elif ch==6:
if score_points<120:
print(“Sorry but you don’t have enough
points to buy this item.”)
else:
print(“You just bought a ‘Graphic design
sketchbook’ for 120 points”)
Litems.append(“Graphic design sketchbook”)
score_points-=120
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:
break
elif ch==7:
if score_points<400:

24
print(“Sorry but you don’t have enough
points to buy this item.”)
else:
print(“You just bought a ‘Super bouncy
rubber ball set’ for 400 points”)
Litems.append(“Super bouncy rubber ball
set”)
score_points-=400
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:
break
elif ch==8:
if score_points<900:
print(“Sorry but you don’t have enough
points to buy this item.”)
else:
print(“You just bought a ‘Colorful
headphones’ for 900 points”)
Litems.append(“Colorful headphones”)
score_points-=900
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:
break
elif ch==9:
if score_points<150:
print(“Sorry but you don’t have enough
points to buy this item.”)
else:
print(“You just bought a ‘The FUTURZ ARCADE
exclusive T-shirt’ for 150 points”)
Litems.append(“The FUTURZ ARCADE exclusive
T-shirt”)
score_points-=150
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:

25
break
elif ch==10:
if score_points<550:
print(“Sorry but you don’t have enough
points to buy this item.”)
else:
print(“You just bought a ‘Cool holographic
stickers pack’ for 550 points”)
Litems.append(“Cool holographic stickers
pack”)
score_points-=550
ch=int(input(‘Wanna buy more?(1...Yes/2...
No) ‘))
if ch==2:
break
with open(“Futurz Arcade DB.bin”, “rb”) as F:
Ddetails=pickle.load(F)
Ddetails[password][5]=Litems
Ddetails[password][4]=score_points
with open(“Futurz Arcade DB.bin”, ‘wb’) as F:
pickle.dump(Ddetails, F)

elif ch==5: #Log Out


print()
print(‘Logging you out, see you around!’)
break

elif ch==6: #Exit


print()
print(‘Exiting the FUTURZ ARCADE, it was glad having you
here!’)
exit=True
usertype=0
break

26
elif ch==7:
usertype=0
break

while usertype==2: #Emplyee Mode


#Maulik | ID: a7f9z | Password: 3R#B5T8
#Garv | ID: 1b9k3 | Password: *7G2M3R
#Arjun | ID: n8m4y | Password: 5@XQ1L7
#Satyam | ID: c9p2l | Password: 8#C9Z1Q

with open(‘FuturzEmployee.bin’, ‘rb’) as E:


DEmp=pickle.load(E)
print(‘!WELCOME EMPLOYEE!’)
print(‘’’So, lets start with logging you in...’’’)
while True:
empID=input(“Enter your Employee-ID: “)
empPass=input(“Enter your password: “)
if empPass not in DEmp:
print(“Nah, that’s the wrong password. Taking you
back...”)
elif empPass in DEmp and DEmp[empPass][0]!=empID:
print(“Nah, that’s the wrong Player-ID. Taking you
back...”)
else:
password=empPass
empID=DEmp[password][0]
name=DEmp[password][1]
print(‘That is correct. Logging you in...’)
break
print(‘Now That your are logged in.’)
Loggedin=True
while Loggedin:
print(‘’’You can do the following things...
1...See all the un-banned players’ data

27
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
6...Log Out
7...Exit
8...Switch user-type’’’)
ch=int(input(“so. what is it going to be?(1-8) “))

if ch==1: #Un-Banned Player Data


print()
with open(“Futurz Arcade DB.bin”, ‘rb’) as F:
Ddetails=pickle.load(F)
for i in Ddetails:
print()
display_playerDetails(i, Ddetails[i][1], Ddetails[i]
[2], Ddetails[i][0], Ddetails[i][3], Ddetails[i][4], Ddetails[i][5])
print(‘_’*20)

if ch==2: #Banned Player Data


print()
with open(“FuturzBanned.bin”, ‘rb’) as F:
Ddetails=pickle.load(F)
if Ddetails != {}:
for i in Ddetails:
print()
display_playerDetails(i, Ddetails[i][1],
Ddetails[i][2], Ddetails[i][0], Ddetails[i][3], Ddetails[i][4],
Ddetails[i][5])
print(‘_’*20)
else:
print(‘No one is Banned’)

elif ch==3: #All Player Data


print()
with open(“Futurz Arcade DB.bin”, ‘rb’) as F:
28
Dunbanned=pickle.load(F)
with open(“FuturzBanned.bin”, ‘rb’) as F:
Dbanned=pickle.load(F)
print(‘These player(s) are unbanned:\n’)
for i in Dunbanned:
display_playerDetails(i, Dunbanned[i][1],
Dunbanned[i][2], Dunbanned[i][0], Dunbanned[i][3], Dunbanned[i][4],
Dunbanned[i][5])
if Dbanned != {}:
print(‘These player(s) are banned:\n’)
for j in Dbanned:
display_playerDetails(j, Dbanned[j][1],
Dbanned[j][2], Dbanned[j][0], Dbanned[j][3], Dbanned[j][4], Dbanned[j]
[5])
elif Dbanned == {}:
pass

elif ch==4: #Banning


print()
with open(‘FuturzBanned.bin’, ‘rb’) as B:
Dbanned=pickle.load(B)
with open(“Futurz Arcade DB.bin”, ‘rb’) as F:
Ddetails=pickle.load(F)
pID=input(‘Enter player-ID to be banned: ‘)
for i in Ddetails:
if Ddetails[i][0]==pID:
Dbanned[i]=Ddetails[i]
print(Dbanned[i][1], ‘is now banned from the
arcade.’)
del Ddetails[i]
with open(‘FuturzBanned.bin’, ‘wb’) as B:
pickle.dump(Dbanned,B)

with open(‘Futurz Arcade DB.bin’, ‘wb’) as F:


pickle.dump(Ddetails, F)

29
elif ch==5: #Un-banning
print()
with open(‘FuturzBanned.bin’, ‘rb’) as B:
Dbanned=pickle.load(B)
with open(“Futurz Arcade DB.bin”, ‘rb’) as F:
Ddetails=pickle.load(F)
pID=input(‘Enter player-ID to be banned: ‘)
for i in Dbanned:
if Dbanned[i][0]==pID:
Ddetails[i]=Dbanned[i]
print(Ddetails[i][1], ‘is now un-banned from the
arcade.’)
del Dbanned[i]
with open(‘Futurz Arcade DB.bin’, ‘wb’) as F:
pickle.dump(Ddetails,F)

with open(‘FuturzBanned.bin’, ‘wb’) as B:


pickle.dump(Dbanned, B)

elif ch==6: #Log out


print()
print(‘Logging you out, see you around!’)
Loggedin=False

elif ch==7: #Exit


print()
print(‘Exiting the FUTURZ ARCADE, it was glad having you
here!’)
exit=True
usertype=0
Loggedin=False

elif ch==8: #Switch User-type


usertype=0
Loggedin=False

30
Output
==========WELCOME TO THE FUTURZ ARCADE==========
So, are you a player or an employee of the arcade?
1...Player
2...Employee
So, what is your User-Type?(1 or 2): 1
!WELCOME PLAYER!
So, if you’re new then Sign Up and if you are coming back, then Log In...
1...Sign Up
2...Log In
So, what’s it going to be?(1 or 2) 2
Welcome back! We’re so glad to see you again...
Enter your Player-ID: 3k32vqo
Enter your Password: OI7NO
That is correct. Logging you in...

Now, you can do the following things...


1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type
so. what is it going to be?(1-6) 1

Choose out of the following games to play:


1...Arround the World..Quizzzz
2...The Rockz - The Paperz - The Scissorz
3...Dice-n-Score
4...Riddlerr

31
PS: Each game costs 100 Credits

Enter your game choice(1-4): 1

Welcome to “Arround the World...Quizzzz”


The rules are simple...anser the question and one correct answer gets you
50 points
Press Enter to start...

Ques.1...What is the capital of Russia?

1...St. Petersburg
2...Moscow
3...Ukrain
4...Tel Aviv

What is your answer?(1-4) 1


Sorry but that one is not the answer. The correct answer is “Moscow”

Ques.2...Which country is also known as the land of Rising-Sun?

1...Japan
2...China
3...North Korea
4...Combodia

What is your answer?(1-4) 1


That is correct! You get 50 points

Ques.3...The capital of Italy is?

1...Venice
2...Florence
3...Rome
4...Naples

32
What is your answer?(1-4) 3
That is correct! You get 50 points

Ques.4...Which river flows through London?

1...Severn
2...Trent
3...Thames
4...Great Ouse

What is your answer?(1-4) 4


Sorry but that one is not the answer. The correct answer is “Thames”

Ques.5...How tall is Mt. Everest?

1...8,842 m
2...7,849 m
3...6,849 m
4...9,849 m

What is your answer?(1-4) 1


That is correct! You get 50 points

Ques.6...Which is the smallest country in the world?

1...Andorra
2...India
3...Maldives
4...Vatican City

What is your answer?(1-4) 3


Sorry but that one is not the answer. The correct answer is “Vatican City”

Ques.7...How many countries are there in the world?


33
1...195
2...145
3...105
4...245

What is your answer?(1-4) 1


That is correct! You get 50 points

Ques.8...Which of the following countries is in Asia?

1...Mongolia
2...Russia
3...Scotland
4...Brazil

What is your answer?(1-4) 3


Sorry but that one is not the answer. The correct answer is “Mongolia”
And that’s where we finish.

Now, you can do the following things...


1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type
so. what is it going to be?(1-6) 2

...Player Details...
Player-ID: 3k32vqo
User password: OI7NO
Name: Maulik
34
Age: 16
Current credit amount: 900
Current Score: 600
Items Owned: None

Now, you can do the following things...


1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type
so. what is it going to be?(1-6) 1

Choose out of the following games to play:


1...Arround the World..Quizzzz
2...The Rockz - The Paperz - The Scissorz
3...Dice-n-Score
4...Riddlerr
PS: Each game costs 100 Credits

Enter your game choice(1-4): 4

Welcome to “Riddlerr”
The rules are simple for this one too...based on the hint given to you,
just guess the correct answer to it.
One correct answer gives you 50 points.

Press Enter to start


Ques.1...A ‘5’ letter word that becomes shorter when you add ‘2’ letters
in it.
Your answer:short
Nah, the correct one is “Shorter”

35
Ques.2...People buy me to eat but never eat me.
Your answer:spoon
Nah, the correct one is “Plate”
Ques.3...Which vehicle is spelled the same backwards
Your answer:racecar
That is correct! And there goes 50 points to you.
Ques.4...I shave everyday, but my beard stays the same. Who am I?
Your answer:barber
That is correct! And there goes 50 points to you.
Ques.5...I am always in front of you, yet you can’t see me. Who am I?
Your answer:tomorrow
Nah, the correct one is “Future”
And we come to an end...

Now, you can do the following things...


1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type
so. what is it going to be?(1-6) 2

...Player Details...
Player-ID: 3k32vqo
User password: OI7NO
Name: Maulik
Age: 16
Current credit amount: 800
Current Score: 700
Items Owned: None

36
Now, you can do the following things...
1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type
so. what is it going to be?(1-6) 3

To add more credits to your account,


you will have to buy it.
50 Credit-Points = Rs.100
How many credits points do you want to buy?: 400
Enter your card number: 2510 2656 6555 4524
Enter expiry of card(MMYY)1027
Enter card owner name: Maulik Pandey
Enter CVV: 307
Alright, we will charge you Rs. 800 for 400 credit amount.
Payment Completed! Your current credit balance is 1200

Now, you can do the following things...


1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type
so. what is it going to be?(1-6) 2

...Player Details...
Player-ID: 3k32vqo
User password: OI7NO
37
Name: Maulik
Age: 16
Current credit amount: 1200
Current Score: 700
Items Owned: None

Now, you can do the following things...


1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type
so. what is it going to be?(1-6) 4

Welcome to the Shop!


You can have the following stuff based on how many points you have scored

1...Glow-in-the-dark stickers (500 points)


2...Mini handheld game console (1000 points)
3...Funky sunglasses (750 points)
4...LED light-up fidget spinner (800 points)
5...Air Force-themed keychain (600 points)
6...Graphic design sketchbook (120 points)
7...Super bouncy rubber ball set (400 points)
8...Colorful headphones (900 points)
9...The FUTURZ ARCADE exclusive T-shirt (150 points)
10...Cool holographic stickers pack (550 points)

So, what are you goind to buy?(1-10) 10


You just bought a ‘Cool holographic stickers pack’ for 550 points
Wanna buy more?(1...Yes/2...No) 1
You can have the following stuff based on how many points you have scored
38
1...Glow-in-the-dark stickers (500 points)
2...Mini handheld game console (1000 points)
3...Funky sunglasses (750 points)
4...LED light-up fidget spinner (800 points)
5...Air Force-themed keychain (600 points)
6...Graphic design sketchbook (120 points)
7...Super bouncy rubber ball set (400 points)
8...Colorful headphones (900 points)
9...The FUTURZ ARCADE exclusive T-shirt (150 points)
10...Cool holographic stickers pack (550 points)

So, what are you goind to buy?(1-10) 6


You just bought a ‘Graphic design sketchbook’ for 120 points
Wanna buy more?(1...Yes/2...No) 2

Now, you can do the following things...


1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type
so. what is it going to be?(1-6) 2

...Player Details...
Player-ID: 3k32vqo
User password: OI7NO
Name: Maulik
Age: 16
Current credit amount: 1200
Current Score: 30
Items Owned: Cool holographic stickers pack,Graphic design sketchbook
39
Now, you can do the following things...
1...Start with some games
2...Check your Profile
3...Add credits to your account
4...Item-Shop
5...Log Out
6...Exit the Arcade
7...Switch User-Type
so. what is it going to be?(1-6) 7

==========WELCOME TO THE FUTURZ ARCADE==========


So, are you a player or an employee of the arcade?
1...Player
2...Employee
So, what is your User-Type?(1 or 2): 2
!WELCOME EMPLOYEE!
So, lets start with logging you in...
Enter your Employee-ID: 1b9k3
Enter your password: *7G2M3R
That is correct. Logging you in...
Now That your are logged in.
You can do the following things...
1...See all the un-banned players’ data
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
6...Log Out
7...Exit
8...Switch user-type
so. what is it going to be?(1-8) 1

40
...Player Details...
Player-ID: 3k32vqo
User password: OI7NO
Name: Maulik
Age: 16
Current credit amount: 1200
Current Score: 150
Items Owned: Cool holographic stickers pack

____________________

...Player Details...
Player-ID: 10
User password: 01
Name: Garv
Age: 14
Current credit amount: 1000
Current Score: 0
Items Owned: None

____________________

...Player Details...
Player-ID: 08hsiku
User password: VO8QP
Name: Adil
Age: 20
Current credit amount: 1000
Current Score: 300
Items Owned: None

____________________
41
...Player Details...
Player-ID: ys05efx
User password: SSVY2
Name: Aditi
Age: 18
Current credit amount: 1000
Current Score: 0
Items Owned: None

____________________

...Player Details...
Player-ID: 08sstku
User password: AL0SK
Name: Satyam Kumar
Age: 12
Current credit amount: 1000
Current Score: 20
Items Owned: None

____________________
You can do the following things...
1...See all the un-banned players’ data
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
6...Log Out
7...Exit
8...Switch user-type
so. what is it going to be?(1-8) 2

42
No one is Banned
You can do the following things...
1...See all the un-banned players’ data
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
6...Log Out
7...Exit
8...Switch user-type
so. what is it going to be?(1-8) 3

These player(s) are unbanned:

...Player Details...
Player-ID: 3k32vqo
User password: OI7NO
Name: Maulik
Age: 16
Current credit amount: 1200
Current Score: 150
Items Owned: Cool holographic stickers pack

...Player Details...
Player-ID: 10
User password: 01
Name: Garv
Age: 14
Current credit amount: 1000
Current Score: 0
Items Owned: None

43
...Player Details...
Player-ID: 08hsiku
User password: VO8QP
Name: Adil
Age: 20
Current credit amount: 1000
Current Score: 300
Items Owned: None

...Player Details...
Player-ID: ys05efx
User password: SSVY2
Name: Aditi
Age: 18
Current credit amount: 1000
Current Score: 0
Items Owned: None

...Player Details...
Player-ID: 08sstku
User password: AL0SK
Name: Satyam Kumar
Age: 12
Current credit amount: 1000
Current Score: 20
Items Owned: None

You can do the following things...


1...See all the un-banned players’ data
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
44
6...Log Out
7...Exit
8...Switch user-type
so. what is it going to be?(1-8) 4

Enter player-ID to be banned: 08sstku


Satyam Kumar is now banned from the arcade.
You can do the following things...
1...See all the un-banned players’ data
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
6...Log Out
7...Exit
8...Switch user-type
so. what is it going to be?(1-8) 4

Enter player-ID to be banned: ys05efx


Aditi is now banned from the arcade.
You can do the following things...
1...See all the un-banned players’ data
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
6...Log Out
7...Exit
8...Switch user-type
so. what is it going to be?(1-8) 2

...Player Details...
Player-ID: 08sstku
45
User password: AL0SK
Name: Satyam Kumar
Age: 12
Current credit amount: 1000
Current Score: 20
Items Owned: None

____________________

...Player Details...
Player-ID: ys05efx
User password: SSVY2
Name: Aditi
Age: 18
Current credit amount: 1000
Current Score: 0
Items Owned: None

____________________
You can do the following things...
1...See all the un-banned players’ data
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
6...Log Out
7...Exit
8...Switch user-type
so. what is it going to be?(1-8) 5

Enter player-ID to be banned: ys05efx


Aditi is now un-banned from the arcade.
You can do the following things...
1...See all the un-banned players’ data
46
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
6...Log Out
7...Exit
8...Switch user-type
so. what is it going to be?(1-8) 3

These player(s) are unbanned:

...Player Details...
Player-ID: 3k32vqo
User password: OI7NO
Name: Maulik
Age: 16
Current credit amount: 1200
Current Score: 150
Items Owned: Cool holographic stickers pack

...Player Details...
Player-ID: 10
User password: 01
Name: Garv
Age: 14
Current credit amount: 1000
Current Score: 0
Items Owned: None

...Player Details...
Player-ID: 08hsiku
User password: VO8QP
47
Name: Adil
Age: 20
Current credit amount: 1000
Current Score: 300
Items Owned: None

...Player Details...
Player-ID: ys05efx
User password: SSVY2
Name: Aditi
Age: 18
Current credit amount: 1000
Current Score: 0
Items Owned: None

These player(s) are banned:

...Player Details...
Player-ID: 08sstku
User password: AL0SK
Name: Satyam Kumar
Age: 12
Current credit amount: 1000
Current Score: 20
Items Owned: None

You can do the following things...


1...See all the un-banned players’ data
2...See all the banned players’ data
3...Check all players’ data
4...Ban a player
5...Un-ban a player
6...Log Out
48
7...Exit
8...Switch user-type
so. what is it going to be?(1-8) 7

Exiting the FUTURZ ARCADE, it was glad having you here!

49
Bibliography
I would like to extend my gratitude
to the following websites in helping
me to make this project a success:
• chatgpt.com
• support.enthought.com
• w3schools.com
• geeksforgeeks.org
• sawaal.com
• blog.prescholar.com

50
Scope Of
Improvement
If I were given more time and have covered more of
my syllabus before the finishing and submission
deadline of this project, I could have focused and
improve/added the following points in my project:

The formatting of output


Exception handling
Datafile handling

51
X X X X X X

X X X X X X

X X X X X X

X X X X X X

X X X X X X

X X X X X X

X X X X X X

X X X X X X

X X X X X X 52

You might also like