Python實現簡單猜字遊戲

-*- coding: utf-8 -*- import random print u'請從一到十中選擇一個數' temp=input(u'不妨從猜一下我內心在想什麼數字:') a=int(temp) guess=random.randint(1,10) if a==guess: print u'恭喜你猜中了' else: print u'猜錯啦,我內心想的是{}!'.forma
相關文章
相關標籤/搜索