Project 5 - Magic 8 Ball Fortune Telling Project
Project 5 - Magic 8 Ball Fortune Telling Project
01 ACKNOWLEDGEMENT 02
02 INTRODUCTION 03
04 PROPOSED SYSTEM 04
05 FLOW CHART 05
06 SOURCE CODE 06
07 OUTPUT 08
08 TESTING 09
10 BIBLIOGRAPHY 13
1
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely
express my gratitude to the people who have been instrumental in the successful
for the successful completion of the project. I gratefully acknowledge the contribution
of the individuals who contributed in bringing this project up to this level, who continues
guide, Mentor all the above a friend, who critically reviewed my project and helped in
solving each and every problem, occurred during implementation of the project.
Mrs.S.Parvathi, who has been continuously motivating and extending their helping
hand to us.
The guidance and support received from all the members who contributed
and who are contributing to this project, was vital for the success of the project.
2
PROJECT ON MAGIC 8 BALL FORTUNE TELLING GAME
INTRODUCTION
The Magic 8 Ball is a toy used for fortune-telling or seeking advice, developed in the
Note :
The objective of this project is to let the students apply the programming
knowledge into a real- world situation/problem and exposed the students how
programming skills helps in developing a good software.
3
PROPOSED SYSTEM
Today one cannot afford to rely on the fallible human beings of be really wants
to stand against today’s merciless competition where not to wise saying “to err is
human” no longer valid, it’s outdated to rationalize your mistake. So, to keep pace
with time, to bring about the best result without malfunctioning and greater efficiency
so to replace the unending heaps of flies with a much sophisticated hard disk of the
computer.
One has to use the data management software. Software has been an ascent
markets, which have helped in making the organizations work easier and efficiently.
Data management initially had to maintain a lot of ledgers and a lot of paper work has
to be done but now software product on this organization has made their work faster
and easier. Now only this software has to be loaded on the computer and work can be
done.
This prevents a lot of time and money. The work becomes fully automated and
any information regarding the organization can be obtained by clicking the button.
4
FLOW CHART
5
SOURCE CODE
Create a Python project of a Magic 8 Ball which is a toy used for fortune-telling
or seeking advice.
Note :
SOLUTION:
import random
answers = ['It is certain', 'It is decidedly so', 'Without a doubt', 'Yes – definitely', 'You
may rely on it', 'As I see it, yes', 'Most likely', 'Outlook good', 'Yes Signs point to yes',
'Reply hazy', 'try again', 'Ask again later' , 'Better not tell you now', 'Cannot predict
now', 'Concentrate and ask again', 'Dont count on it', 'My reply is no', 'My sources say
no', 'Outlook not so good', 'Very doubtful']
print(' __ __ _____ _____ _____ ___ ')
print(' | \ / | /\ / ____| |_ _| / ____| / _ \ ')
print(' | \/ | / \ | | __ || || | (_) |')
print(' | |\/| | / /\ \| | |_ | || || > _ < ')
print(' | | | | / __ \ |__| | _| |_ | |____ | (_) |')
print(' |_ | |_|/_/ \_\_____||_____| \_____| \___/ ')
print('')
print('')
print('')
print('Hello World, I am the Magic 8 Ball, What is your name?')
6
name = input()
print('hello ' + name)
def Magic8Ball():
print('Ask me a question?.')
input()
print (answers[random.randint(0, len(answers)-1)] )
print('I hope that helped!')
Replay()
def Replay():
print ('Do you have another question? [Y/N] ')
reply = input()
if reply == 'Y':
Magic8Ball()
elif reply == 'N':
exit()
else:
print('I apologies, I did not catch that. Please repeat.')
Replay()
Magic8Ball()
7
OUTPUT
8
TESTING
Software Testing is an empirical investigation conducted to provide
stakeholders with information about the quality of the product or service under test[1]
, with respect to the context in which it is intended to operate. Software Testing also
provides an objective, independent view of the software to allow the business to
appreciate and understand the risks at implementation of the software. Test
techniques include, but are not limited to, the process of executing a program or
application with the intent of finding software bugs.
It can also be stated as the process of validating and verifying that a software
program/application/product meets the business and technical requirements that
guided its design and development, so that it works as expected and can be
implemented with the same characteristics. Software Testing, depending on the
testing method employed, can be implemented at any time in the development
process, however the most test effort is employed after the requirements have been
defined and coding process has been completed.
TESTING METHODS
Software testing methods are traditionally divided into black box testing and
white box testing. These two approaches are used to describe the point of view that a
test engineer takes when designing test cases.
SPECIFICATION-BASED TESTING
9
Specification-based testing aims to test the functionality of software according
to the applicable requirements.[16] Thus, the tester inputs data into, and only sees the
output from, the test object. This level of testing usually requires thorough test cases
to be provided to the tester, who then can simply verify that for a given input, the output
value (or behaviour), either "is" or "is not" the same as the expected value specified in
the test case. Specification-based testing is necessary, but it is insufficient to guard
against certain risks
The black box tester has no "bonds" with the code, and a tester's perception is
very simple: a code must have bugs. Using the principle, "Ask and you shall receive,"
black box testers find bugs where programmers don't. But, on the other hand, black
box testing has been said to be "like a walk in a dark labyrinth without a flashlight,"
because the tester doesn't know how the software being tested was actually
constructed.
That's why there are situations when (1) a black box tester writes many test
cases to check something that can be tested by only one test case, and/or (2) some
parts of the back end are not tested at all. Therefore, black box testing has the
advantage of "an unaffiliated opinion," on the one hand, and the disadvantage of "blind
exploring," on the other.
White box testing, by contrast to black box testing, is when the tester has
access to the internal data structures and algorithms (and the code that implement
these)
10
CODE COMPLETENESS EVALUATION
White box testing methods can also be used to evaluate the completeness of a
test suite that was created with black box testing methods. This allows the software
team to examine parts of a system that are rarely tested and ensures that the most
important function points have been tested.
11
HARDWARE AND SOFTWARE REQUIREMENTS
SOFTWARE REQUIREMENTS:
I. Windows OS
II. Python
12
BIBLIOGRAPHY
***
13
PROJECT
MAGIC 8
BALL
FORTUNE TELLING
GAME
14
15