• צור קשר

  • פורום וחידות לראיון עבודה

  • סיוע לפרויקטים

  • סרטוני הדרכה

  • קורס פייתון

  • בית

  • More

     pythonIsrael.com

    Untitled
    1. General Discussions
    2. שלום לכולם אני מקבל הודעת שגיאה TypeError: 'int' object is not callable כשאני מנסה לטעון את הקוד הזה
    Search
    shimon066536
    Jul 19, 2020

    שלום לכולם אני מקבל הודעת שגיאה TypeError: 'int' object is not callable כשאני מנסה לטעון את הקוד הזה

    def welcome(name):

    print ('Hello' ,(name) ,'and welcome to the World of Games (WoG).\nHere you can find many cool games to play.')




    def load_game():

    print ('1. Memory Game - a sequence of numbers will appear for 1 second and you have to guess it back\n2. Guess Game - guess a number and see if you chose like the computer\n3. Currency Roulette - try and guess the value of a random amount of USD in ILS Gets an input from the user about the game he chose.')

    game = int(input('Please choose a game to play: '))

    if game > 0 and game < 4:

    print ('You have selected ' ,game)

    difficulty()

    else:

    print ('Please enter a number from 1 to 3')

    load_game()

    def difficulty():

    difficulty = int(input('Please choose game difficulty from 1 to 5: '))

    if difficulty > 0 and difficulty < 6:

    print ('You have selected ' ,difficulty)

    else:

    print ('Please enter a number from 1 to 5')

    difficulty()


    welcome("Guy")

    (load_game())


    אני מקבל את הודעת השגיאה כשזה נכנס לפונקציה def difficulty(): והתשובה חורגת מ5

    כמה שאני מנסה אני לא מבין למה

    אם מישהו יכול לעזור אני מאוד ישמח

    0