Getting Invalid input whenever inputting anything into a input function

Question:

okay, I was trying to build a guess the number game that can use the only two languages that I know of: English and Chinese, but currently, my code is a bit broken right now. I have no clue why and how it’s broken, but I just need some help. Did I type a wrong parenteseise? did I misuse a function?

"""
Guess The Number
Write a program 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.
"""

def ENGLISH_hello():
    print("Hi, welcome to guess the number, here, you will guess a number from 1 to 100")
def CHINESE_hello():
    print("你好,欢迎你到猜数字, 在这里,你护额才一个数字从1到100")
def chinese_guess():
    print('ALL IS WELL')
def english_guess():
    print('ALL IS WELL')
def guess_the_number():
    try:
        Language = input("Hi, if you are fluent in english, type 'E'. 你好,如果你会说中文,请打 'Z'")
        if Language.strip == "z" or Language.strip == "Z":
            chinese_guess()
        elif Language.strip == "e" or Language.strip == "E":
            english_guess()
        else:
            print("INVALID INPUT")
            guess_the_number()

    except Exception as E:
        print("Sorry, something went wrong: " + str(E))

guess_the_number()
Asked By: Nanmuhong Ye

||

Answers:

The String.strip is a function
So it should be used as Language.strip()

Answered By: Singh
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.