Question: In python . Lab Week 6-Strings Skille Needed to complete tis Lab - Index, sice strings e Iterate over strings . use string methods e
Lab Week 6-Strings Skille Needed to complete tis Lab - Index, sice strings e Iterate over strings . use string methods e use the random module Code Breaker Code breaker is a simple game where the program will create a 5 digit code with 10 possible characters (ABCDEFGHIJ). The player will be allowed to guess the code, if they guess right, then the game is over, if they guess wrong, then they are told how many characters were correct. They are also told how many characters were in the correct place. If the code generated is dbgh, and the user guesses abde, then the program lets them know that they got 2 of the characters correct ( the b and the d). The program also informs them that they got one letter in the correct place. In this case it is the b. (The users are not told which characters or positions are correct, only the number. You will want to use functions to break the program down as much as possible into smaller tasks. While you are testing you may also want to show code word so that it is easier to test. Example Program Try to guess the code word Enter your guess 5 characters ABCDE 3 correct, e in the right space Enter your guess 5 charactersBACDE 3 correct, 1 in the right space Enter your guess 5 charactersBIAE You guess the correct word BIAE) in 3 tries Do you want to play again (Y/N) y Try to guess the code word Enter your guess 5 characters EHJBC 5 correct, 1 in the right space Enter your guess 5 characters>cBJHE You guess the correct word CB3HE in 2 tries Do you want to play again (Y/N) Grading and Turning In Turn in your program before the end of the lab. Only upload the Lab5.py file, as other files will be ignored
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
