Member 12388676 Ответов: 1

Привет, как сделать easygui для пароля и имени пользователя в Python ?


import easygui


import random
AddAnswers = 0



MathsOperater = easygui.buttonbox ("What maths Operater would you like to test?", choices = ["+"])
if MathsOperater == "Addition":
    easygui.msgbox ("Enter A Correct Answer to Achicve a Mark")
    for number in range(0,10):
        num1 = random.randrange(0,11)
        num2 = random.randrange(0,11)
        PlayerAnswer = easygui.enterbox ("What is " +str(num1)+ " + " +str(num2)+ "?")
        if int(PlayerAnswer) == num1 + num2:
            AddAnswers += 1
            easygui.msgbox ("Correct! Your score is "+str(AddAnswers))
            print(AddAnswers)#To see if game is keeping count of questions asked
        else:
            AddAnswers += 0
            IncorrectAnswers += 1
            easygui.msgbox ("Sorry, incorrect! Your score is still "+str(AdditionAnswers))
        print(AddAnswers)#To see if game is keeping count of questions asked

    easygui.msgbox ("You scored " +str(AddAnswers)+ " out of 10")
    print(AddAnswers) #To check if programme is calculating score correctly


Что я уже пробовал:

это то, что у меня есть, но я хочу сначала войти в систему, прежде чем начать ??