0% found this document useful (0 votes)
70 views15 pages

Project 5 - Magic 8 Ball Fortune Telling Project

The document describes an index and contents of a project on a Magic 8 Ball fortune telling game. It includes sections on acknowledgements, introduction, objectives, proposed system flowchart, source code, output, testing methods including black box testing, and advantages and disadvantages of black box testing. The project allows a user to ask a question, see a loading message, and receive a random response from a list of possible answers.

Uploaded by

skullcracker0203
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)
70 views15 pages

Project 5 - Magic 8 Ball Fortune Telling Project

The document describes an index and contents of a project on a Magic 8 Ball fortune telling game. It includes sections on acknowledgements, introduction, objectives, proposed system flowchart, source code, output, testing methods including black box testing, and advantages and disadvantages of black box testing. The project allows a user to ask a question, see a loading message, and receive a random response from a list of possible answers.

Uploaded by

skullcracker0203
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/ 15

INDEX

SER DESCRIPTION PAGE NO

01 ACKNOWLEDGEMENT 02

02 INTRODUCTION 03

03 OBJECTIVES OF THE PROJECT 03

04 PROPOSED SYSTEM 04

05 FLOW CHART 05

06 SOURCE CODE 06

07 OUTPUT 08

08 TESTING 09

09 HARDWARE AND SOFTWARE REQUIREMENTS 12

10 BIBLIOGRAPHY 13

1
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely

on the encouragement and guidelines of many others. I take this opportunity to

express my gratitude to the people who have been instrumental in the successful

completion of this project.

I express deep sense of gratitude to almighty God for giving me strength

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

to look after me despite my flaws.

My sincere thanks to, our Computer Science teacher Ms.S.Monisha, a

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.

I express my deep sense of gratitude to the luminary our Principal

Mrs.S.Parvathi, who has been continuously motivating and extending their helping

hand to us.

I express my sincere thanks to our Vice Principal Mr. D.Jaganathan, for

constant encouragement and the guidance provided during this project .

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.

I am grateful for their constant support and help.

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

1950s and manufactured by Mattel.

Note :

• Allow the user to input their question.

• Show an in progress message.

• Create 10/20 responses, and show a random response.

• Allow the user to ask another question/advice or quit the game.

OBJECTIVES OF THE PROJECT

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.

1. Write programs utilizing modern software tools.


2. Apply object oriented programming principles effectively when developing small
to medium sized projects.
3. Write effective procedural code to solve small to medium sized problems.
4. Students will demonstrate a breadth of knowledge in computer science, as
exemplified in the areas of systems, theory and software development.
5. Students will demonstrate ability to conduct a research or applied Computer
Science project, requiring writing and presentation skills which exemplify
scholarly style in computer science.

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

in atomization various organisations. Many software products working are now in

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.

Moreover, now it’s an age of computers of and automating such an

organization gives the better look.

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 :

• Allow the user to input their question.

• Show an in progress message.

• Create 10/20 responses, and show a random response.

• Allow the user to ask another question/advice or quit the game.

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.

BLACK BOX TESTING


Black box testing treats the software as a "black box," without any knowledge
of internal implementation. Black box testing methods include: equivalence
partitioning, boundary value analysis, all-pairs testing, fuzz testing, model-based
testing, traceability matrix, exploratory testing and specification-based testing.

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

ADVANTAGES AND DISADVANTAGES

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

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)

Types of white box testing:-


The following types of white box testing exist:
api testing - Testing of the application using Public and Private APIs.
Code coverage - creating tests to satisfy some criteria of code coverage.
For example, the test designer can create tests to cause all statements in the
program to be executed at least once. fault injection methods. mutation testing
methods. static testing - White box testing includes all static testing.

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.

Two common forms of code coverage are:


Function Coverage: Which reports on functions executed and
Statement Coverage: Which reports on the number of lines executed to
complete the test.
They both return coverage metric, measured as a percentage

11
HARDWARE AND SOFTWARE REQUIREMENTS

I.OPERATING SYSTEM : WINDOWS 7 AND ABOVE


II. PROCESSOR :
PENTIUM(ANY) OR AMD

ATHALON(3800+- 4200+ DUAL CORE)


III. MOTHERBOARD :
1.845 OR 915,995 FOR PENTIUM 0R MSI

K9MM-V VIA K8M800+8237R PLUS

CHIPSET FOR AMD ATHALON

IV. RAM : 512MB+

V. Hard disk : SATA 40 GB OR ABOVE

VI. CD/DVD r/w multi drive combo: (If back up required)


(If Backup required)
VII. FLOPPY DRIVE 1.44 MB :

VIII. MONITOR 14.1 or 15 -17 inch

IX. Key board and mouse

X. Printer : (if print is required – [Hard copy])

SOFTWARE REQUIREMENTS:

I. Windows OS
II. Python

12
BIBLIOGRAPHY

1. Computer science With Python - Class XI By : Sumita Arora

***

13
PROJECT
MAGIC 8
BALL
FORTUNE TELLING
GAME

14
15

You might also like