BIS102 Assessment 2
BIS102 Assessment 2
Assessment 2
Assignment Description
This assignment will give you practical exposure with interactive programs, if/else
statements, methods that return values, and while loops.
Please make a guess of my number. For each guess, I will tell you whether the
Your guess? 20
higher
Your guess? 40
higher
Your guess? 60
higher
Your guess? 80
Apex Australia Higher Education, CRICOS Provider No. 03967J; PRV14320, ABN: 45 615 071 853.
higher
lower
Your guess? 90
lower
Your guess? 88
lower
Your guess? 86
Your guess? 20
higher
Your guess? 40
higher
Your guess? 60
higher
Your guess? 80
higher
Your guess? 82
higher
Your guess? 84
higher
Your guess? 86
Apex Australia Higher Education, CRICOS Provider No. 03967J; PRV14320, ABN: 45 615 071 853.
higher
Your guess? 88
higher
Your guess? 90
higher
Your guess? 92
higher
Your guess? 94
lower
Your guess? 93
Your guess? 20
higher
Your guess? 40
higher
Your guess? 60
lower
Your guess? 58
lower
Your guess? 56
Apex Australia Higher Education, CRICOS Provider No. 03967J; PRV14320, ABN: 45 615 071 853.
Overall results:
Total games = 3
Total guesses = 25
Max guesses = 12
2. Translate your design to a Python code. The program should be stored in a file
called ApexXXX.py where ApexXXX is your student ID.
3. Define a class constant for the maximum number (MAX_GUESS) that the user
can guess.
5. When you ask the user whether or not to play again, you should use the “next()”
method of the Scanner class to read a one-word answer from the user. You should
continue playing if this answer begins with the letter “y” or the letter “Y”. Notice that
the user can type words like “yes”. You have to look just at the first letter of the user’s
response and see whether it begins with a “y” or “n” (either capitalized or not) to
determine whether to play again.
6. At the end of the log you should print a summary report about the series of games
played by the user, these being the total number of games played (use a variable to
Apex Australia Higher Education, CRICOS Provider No. 03967J; PRV14320, ABN: 45 615 071 853.
keep track of this), the total number of guesses (Max guesses) made (use another
variable to keep track of this), and the average number of guesses per game.
Apex Australia Higher Education, CRICOS Provider No. 03967J; PRV14320, ABN: 45 615 071 853.
4. Your program compiles successfully without any errors 5
5. Your program is interactive and gives correct output 5
Total Marks 50
Marking Rubric for Assignment 2: Total Marks 50
Apex Australia Higher Education, CRICOS Provider No. 03967J; PRV14320, ABN: 45 615 071 853.
implemented and runs is mostly well not method not
successfully implemented outstanding implemented
Follows syntax rules Very good Good effort Made some Program
and Python effort is made made but effort completely
programming in following not fails to
conventions, program Python syntax outstanding compile and
runs correctly and run
conventions
Apex Australia Higher Education, CRICOS Provider No. 03967J; PRV14320, ABN: 45 615 071 853.