Using msvcrt.getch()
<p>I am creating a guessing program that allow two player to compete where one input a number and the other guess the answer. However At first I used the input code for the user to enter a number but this displayed the user input which allow the second user to view entry.</p>

<p>Hovwever I tired using numberGuess = msvcrt.getch() as a result I got the outcome shown below. what should I do so that i can perform the same checks on numberGuess without getting an error? as well as the user entry is replace with "*" </p>

<p>My Code:</p>

<pre><code>import msvcrt
from random import randint
import struct
def HumanAgainstHuman ():
    changemax = input("Would you like to change the maximum?")
    if changemax.lower() == "yes":
       maxNumber = int(input("Enter the new max:"))
    else:
       maxNumber = 9

    numberGuess = msvcrt.getch()
    nuberGuress= int(numberGuess)

    while numberGuess &lt; 1 or numberGuess &gt; maxNumber:
          numberGuess = input("Not a valid choice, please enter another number: \n").replace
          guess = 0
          numberGuesses = 0
    while guess != numberGuess and numberGuesses &lt; 3:
          guess = int(input("Player Two have a guess: \n"))
          numberGuesses = numberGuesses + 1
    if guess == numberGuess:
        print("Player Two wins")
    else:
        print("Player One wins")

    PlayAgain()

 def choosingGame():

     Choice = int(input("Choose...\n 1 for Human Vs Human \n 2 for Human Vs AI \n 3 for AI Vs AI \n"))

     while Choice &lt; 1 or Choice &gt; 3:
           Choice = int(input("Try again...Choose...\n 1 for Human Vs Human \n 2 for Human Vs AI \n 3 for AI Vs AI \n"))

     if Choice == 1:
        HumanAgainstHuman()
     elif Choice == 2:
          HagainstAI()
    elif Choice == 3:
          AIagainstAI()

def PlayAgain():
     answer = int(input("Press 1 to play again or Press any other number to end"))
     if answer == 1:
            choosingGame()
    else:
         print("Goodbye!")
         try:
             input("Press enter to kill program")
         except SyntaxError:
           pass

 choosingGame()
</code></pre>

<p>Outcome when running the program</p>

<pre><code>    Choose...
    1 for Human Vs Human 
    2 for Human Vs AI 
    3 for AI Vs AI 
    1
    Would you like to change the maximum?no
    Traceback (most recent call last):
       File "C:/Users/Sarah/Documents/testing.py", line 55, in &lt;module&gt;
           choosingGame()
       File "C:/Users/Sarah/Documents/testing.py", line 38, in choosingGame
           HumanAgainstHuman()
       File "C:/Users/Sarah/Documents/testing.py", line 14, in HumanAgainstHuman
    ValueError: invalid literal for int() with base 10: b'\xff'
</code></pre>