Term Project - 2019
Term Project - 2019
Complex problem solving attributes covered (as per PEC - OBA manual – 2014)
Range of resources: Involve the use of diverse resources (and for this purpose, resources include
people, money, equipment, materials, information and technologies).
Level of interaction: Require resolution of significant problems arising from interactions between
wide-ranging or conflicting technical, engineering or other issues.
Innovation: Involve creative use of engineering principles and research-based knowledge in novel
Problem Statement
Apply basic programming language structures to implement variation of the classic word game
HANGMAN in Python.
Description
Your application will allow the user to play hangman against the computer. The computer picks a word,
randomly form a list of available words, and the player tries to guess letters in the word. The player is
given a certain number of guesses at the beginning. The game is interactive; as the player inputs his/her
guess, the computer either:
reveals the letter if it exists in the secret word
penalize the user and updates the number of guesses remaining.
The game ends when either the user guesses the secret word, or the user runs out of guesses.
Winning Game
Loading word list from file...
55900 words loaded.
Welcome to the game Hangman!
I am thinking of a word that is 4 letters long.
You have 3 warnings left.
-------------
You have 6 guesses left.
Available letters: abcdefghijklmnopqrstuvwxyz
Please guess a letter: a
Good guess: _ a_ _
------------
You have 6 guesses left.
Available letters: bcdefghijklmnopqrstuvwxyz
Please guess a letter: a
Oops! You've already guessed that letter.
You have 2 warnings left: _ a_ _
------------
You have 6 guesses left.
Available letters: bcdefghijklmnopqrstuvwxyz
Please guess a letter: s
Oops! That letter is not in my word: _ a_ _
------------
You have 5 guesses left.
Available letters: bcdefghijklmnopqrtuvwxyz
Please guess a letter: $
Oops! That is not a valid letter.
You have 1 warnings left: _ a_ _
------------
You have 5 guesses left.
Available letters: bcdefghijklmnopqrtuvwxyz
Please guess a letter: t
Good guess: ta_ t
------------
You have 5 guesses left.
Available letters: bcdefghijklmnopqrtuvwxyz
Please guess a letter: e
Oops! That letter is not in my word: ta_ t
------------
You have 3 guesses left.
Available letters: bcdfghijklmnopqrtuvwxyz
Please guess a letter: e
Oops! You've already guessed that letter.
You have 0 warnings left: ta_ t
------------
You have 3 guesses left.
Available letters: bcdfghijklmnopqrtuvwxyz
Please guess a letter: e
Oops! You've already guessed that letter.
You have no warnings left so you lose one guess: ta_ t
------------
You have 2 guesses left.
Available letters: bcdfghijklnopquvwxyz
Please guess a letter: c
Good guess: tact
------------
Congratulations, you won!
Your total score for this game is: 4
Losing Game
Loading word list from file...
55900 words loaded.
Welcome to the game Hangman!
I am thinking of a word that is 4 letters long
You have 3 warnings left.
-----------
You have 6 guesses left
Available Letters: abcdefghijklmnopqrstuvwxyz
Please guess a letter: a
Oops! That letter is not in my word: _ _ _ _
-----------
You have 4 guesses left
Available Letters: bcdefghijklmnopqrstuvwxyz
Please guess a letter: b
Oops! That letter is not in my word: _ _ _ _
-----------
You have 3 guesses left
Available Letters: cdefghijklmnopqrstuvwxyz
Please guess a letter: c
Oops! That letter is not in my word: _ _ _ _
-----------
You have 2 guesses left
Available Letters: defghijklmnopqrstuvwxyz
Please guess a letter: 2
Oops! That is not a valid letter.
You have 2 warnings left: _ _ _ _
-----------
You have 2 guesses left
Available Letters: defghijklmnopqrstuvwxyz
Please guess a letter: d
Oops! That letter is not in my word: _ _ _ _
-----------
You have 1 guesses left
Available Letters: efghijklmnopqrstuvwxyz
Please guess a letter: e
Good guess: e_ _ e
-----------
You have 1 guesses left
Available Letters: fghijklmnopqrstuvwxyz
Please guess a letter: f
Oops! That letter is not in my word: e_ _ e
-----------
Sorry, you ran out of guesses.
The word was else.
Design Constraints
You can add your own words to the file word.txt too. Till the time you study filing in class, you can
hardcode a word and start developing logic for the game.
Organize your code in functions and files. Each function must be stored in a separate file.
The code must be easy to read and follow.
You can use any already implemented library functions.
Try to make your print statements as close to the example game as possible.
Deliverables
Submit names and roll numbers of your project group members on an A4 size sheet ( fill the last
page) , in Digital Design Lab latest by December 31st , 2019. You can work in groups of 4. Group
members must belong to one practical group.
Submit Python code of the application, the .py files, latest by January 17, 2019 in a cd along with all
stuff specified in the next point.
Prepare a report and submit it in Digital Design Lab latest by January 17, 2019. The report has to be
organized as follows:
o Title page. The rubric sheet given at the end of this document will serve as the title page of your
report.
o Text of 500 words at maximum, answering the following questions:
1. What are the distinguishing features of your project?
2. What was the most challenging part for you while working on the project?
3. Did you learn anything new in Python while working on this project?
o Hardcopy print of Python Code.
o Hardcopy print of at least 4 test case runs, including at least one winning and one loosing game.
DEPARTMENT OF COMPUTER & INFORMATION SYSTEMS ENGINEERING
BACHELORS IN COMPUTER SYSTEMS ENGINEERING
Course Code: CS-115
Course Title: Computer Programming
Complex Engineering Activity
FE Batch 2019, Fall Semester 2018
Grading Rubric
Group Members:
Student No. Name Roll No.
S1
S2
S3
Marks Obtained
CRITERIA AND SCALES
S1 S2 S3
Criterion 1: Does the application meet the desired specifications and produce the desired
outputs?
0–1 2-3 4–5
The application is The program produces correct The program works and
producing incorrect outputs but does not display them meets all of the
outputs. correctly. specifications.
Criterion 2: How well is the code organization?
0–1 2-3 4–5
The code is poorly The code is readable only by The code is well organized
organized and very someone who knows what it is and very easy to follow
difficult to read. supposed to be doing.
Criterion 3: How friendly is the application interface?
0–1 2-3 4–5
The application interface is The application interface is easy The application interface is
difficult to understand and to understand and but not that very easy to understand and
use. comfortable to use. use.
Criterion 3: How did the student answer questions relevant to the task?
0–2 3-7 8 – 10
The student answered few The student answered all
The student answered most of the
questions relevant to the the questions relevant to the
questions relevant to the solution.
solution. solution.
Criterion 4: Does the report adhere to the given format?
0–1 2-3 4–5
The report does not contain The report contains the required The report contains all the
the required information. information only partially. required information and
OR OR completely adheres to the
The organization of the The organization of the report given format.
report is poor. follows the given format only
partially.
Total Marks:
Teacher’s Signature:____________
Computer Programming Project Group Information
Group Members
Date of submission:
Approved by
____________________
Practical Class Teacher