code breakers (python)

Completado Publicado hace 5 años Pagado a la entrega
Completado Pagado a la entrega

In this problem you are to design a game called “Code Breakers” which is played between 2 players. Each player takes a turn to setup a code that the other player has to break. Players get points based on how close they get to breaking the code.

Your game should begin by some welcome message welcoming the players into the game. Next the players have to determine how many rounds they want to play the game for. This has to be a positive integer number. In each round one player sets up the code and the other players tries to break it and vice versa.

At each round the player who is setting up the code asks the other player to look away and then types in the codeword. Once the player is done and presses enter, the screen is cleared [perhaps print many newlines]. It will be wise to convert the codeword to all lowercase at this point as it will make it easier for you to code the rest of the program [see list of useful functions below].

After setting up the code, the next thing a player sets up is the number of guesses he/she will allow the opponent player to have to break the code. This should be a positive integer (i.e. an integer greater than 0).

At this point the opponent player (who is trying to break the code) starts his play. He guesses one character (again picking some character from a to z) at a time until he either guesses the string correctly (breaks the code) or runs out of number of guesses that he/she is allowed in that round of play by the other player. After each guess by the opponent you should display the partially guessed word [see Sample Input and Output].

When the opponent player reaches his/her limit for the number of guesses, or better yet guesses the whole word correctly, the players change their roles, i.e. – the one who was setting up the code before now tries to guess the code setup by his/her opponent.

At the end of each round the players get to see their scores up to that point in the game [see Sample Input and Output].

After all rounds are over (determined by the players at the beginning of the game) you should determine who wins/loses/if it’s a draw. Then you should print a game over message and end the game.

SOME HINTS:

There are a number of different built-in python functions that you may want to use for this program. For example, chr(…), ord(…) functions may be used. Strings have a built-in method that converts the whole string to all lowercase characters. Please remember that I am only providing you with names of these built-in python functions. It is your responsibility to look them up in the links I have provided during the course and figure out how exactly to use them.

Python

Nº del proyecto: #18154705

Sobre el proyecto

4 propuestas Proyecto remoto Activo hace 5 años

Adjudicado a:

koustav2006

HI..I am quite familiar and strong at python programming and can help you write the code breaking game as console programming as per given requirements. please contact me soon for a discussion.

$77 CAD en 1 día
(74 comentarios)
5.6

4 freelancers están ofertando un promedio de $103 por este trabajo

polarjin2017

Hello? How are you? I have good experiences in "code breakers (python)" as you can see my profile for these (Python). I have been working for 7 yrs in this scope. While we contract and work in our jobs, I will get Más

$100 CAD en 3 días
(14 comentarios)
5.0
asadrana91

Hello this is Asad ,i have a vast experience in python programming, if you need an a good grade contact me.

$122 CAD en 2 días
(4 comentarios)
2.8
adityaneural

Hi There, I have been building Games on Python since Pygame was released and absolutely love it! Read the Word doc, and this looks like a fun project that I should be able to finish in a day or two. I'm new t Más

$111 CAD en 3 días
(1 comentario)
0.0