-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgames.html
46 lines (34 loc) · 1.65 KB
/
games.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CST-171 Project Topics</title>
<!-- Bootstrap core CSS -->
<link href="https://v4-alpha.getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
.bold-italic { font-weight: bold; font-style: italic;}
</style>
</head>
<body>
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h1 class="display-3">Games</h1>
<p>In this project you will create a guessing game. Your program will select a number at random and continually ask the user for guesses until the correct number is chosen. Along the way, your program will print "higher" or "lower" to direct the user's guessing.</p>
</div>
</div>
<div class="container">
<!-- Example row of columns -->
<p>Your task is to create a Python program that:</p>
<ul>
<li>Reads a file containing 10 numbers - one number per line</li>
<li>Chooses one of those numbers at random (see Python's libraries for random functions)</li>
<li>Continually asks "Enter your guess" until the correct number is chosen</li>
<li>After each guess is input, the value is compared against the chosen number</li>
<li>Print "Your guess is too high", "Your guess is too low", or "You got it!" depending on how the numbers compare</li>
<li>The game ends when the user guesses the number. When the game does end, the program prints how many guesses it took to get the correct answer</li>
</ul>
<hr>
</div> <!-- /container -->
</body>
</html>