-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProject topics
18 lines (13 loc) · 2.45 KB
/
Project topics
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
1.) Guess The Number
Write a programme where the computer randomly generates a number between 0 and 20. The user needs to guess what the number is. If the user guesses wrong, tell them their guess is either too high, or too low. This will get you started with the random library if you haven't already used it.
2.) Rock, Paper, Scissors Game
Make a rock-paper-scissors game where it is the player vs the computer. The computer’s answer will be randomly generated, while the program will ask the user for their input. This project will better your understanding of while loops and if statements.
3.) Generating a sine vs cosine curve
For this project, you will have a generate a sine vs cosine curve. You will need to use the numpy library to access the sine and cosine functions. You will also need to use the matplotlib library to draw the curve. To make this more difficult, make the graph go from -360° to 360°, with there being a 180° difference between each point on the x-axis.
4.) Password Generator
Write a programme, which generates a random password for the user. Ask the user how long they want their password to be, and how many letters and numbers they want in their password. Have a mix of upper and lowercase letters, as well as numbers and symbols. The password should be a minimum of 6 characters long.
5.) Hangman
This is probably the hardest one out of these 6 small projects. This will be similar to guessing the number, except we are guessing the word. The user needs to guess letters,
Give the user no more than 6 attempts for guessing wrong letter. This will mean you will have to have a counter. You can download a ‘sowpods’ dictionary file or csv file to use as a way to get a random word to use.
6.) Binary Search Algorithm
Create a random list of numbers between 0 and 100 with a difference of 2 between each number. Ask the user for a number between 0 and 100 to check whether their number is in the list. The programme should work like this. The programme will half the list of numbers and see whether the users number matches the middle element in the list. If they do not match, the programme will check which half the number lies in, and eliminate the other half. The search then continues on the remaining half, again checking whether the middle element in that half is equal to the user’s number. This process keeps on going until the programme finds the users number, or until the size of the subarray is 0, which means the users number isn't in the list.