اذهب إلى المحتوى

صفيه الـ

الأعضاء
  • المساهمات

    2
  • تاريخ الانضمام

  • تاريخ آخر زيارة

أجوبة بواسطة صفيه الـ

  1. السلام عليكم .. لو سمحتوا ابي اسوي هذي اللعبة لها واجهه بالبايثون  ادري انه عن طريق استدعاء مكتبة tkinter  بس ماعرفت الطريقة ممكن احد يساعدني ):

    #ghost Game
    
    from random import randint
    
    print ("===================> Ghost Game <===================")
    brave = True
    score = 0
    
    while brave :
        ghost_door = randint(1,3)
        print ("Three doors ahead..===> Ghost is behind one of them")
        print ("[+] Choose which door to open [+]")
        door = input ("choose one door from 1 to 3:  ")
        door_num = int(door)
        if door_num > 3 or door_num < 1 :
            print (" {This Number Does't Exist}")
        if door_num < 3 and door_num >= 1 :
            if door_num == ghost_door :
                print ("GHOOOOOOOOOOST")
                brave = False
            else :
                print ("No Ghost, Gooood")
                print ("You enter the next rooom")
                score = score + 1
    
    if brave == False :
        print ("Run Away Ghoooost behind you")
        print ("Game Over , Your Score : %s" % score)

     

×
×
  • أضف...