Guessing Game Exercises, Summaries of Computer science

A series of exercises related to a guessing game. The exercises cover various aspects of the game, such as handling user input, comparing guesses, and updating the game state. The exercises are designed to help the reader develop their programming skills and understanding of game logic. A step-by-step approach to solving the guessing game problem, with each exercise building upon the previous ones. By working through these exercises, the reader can gain practical experience in implementing a simple guessing game and learn how to apply programming concepts like conditional statements, loops, and data structures to solve real-world problems.

Typology: Summaries

2013/2014

Uploaded on 12/04/2022

box-lem
box-lem 🇺🇸

2 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Exercise 6.1
n i
10 10
10 5
10 6
10 3
10 4
10 2
10 1
10 2
10 1
10 2
10 1
10 2
10 1
10 2
10 1
10 2
10 1
10 2
10 1
10 2
Exercise 6.2
1. False, if the first letter of the answer is y then the condition will match.
2. 1
3. Get the users answer y
4. Y, higher, lower
5. The guess is wrong, and the guess number is too small
6. Mid n is used to find the median number between the range, max n is used to
indicate that the maximum range is this value and min n implies that the current
lowest value is that number.

Partial preview of the text

Download Guessing Game Exercises and more Summaries Computer science in PDF only on Docsity!

Exercise 6. n i 10 10 10 5 10 6 10 3 10 4 10 2 10 1 10 2 10 1 10 2 10 1 10 2 10 1 10 2 10 1 10 2 10 1 10 2 10 1 10 2 Exercise 6.

  1. False, if the first letter of the answer is y then the condition will match.
  2. 1
  3. Get the users answer y
  4. Y, higher, lower
  5. The guess is wrong, and the guess number is too small
  6. Mid n is used to find the median number between the range, max n is used to indicate that the maximum range is this value and min n implies that the current lowest value is that number.