【发布时间】:2019-03-02 00:33:35
【问题描述】:
import time
import random
lista=('ACE','2','3','4','5','6','7','8','9','10','BOY','LADY','KING')
print('You have got',random.choice(lista))
i=int(input('Do you want to get a new card'))
YES=1
if i == YES:
print('Your second card is:',random.choice(lista))
我想以YES 作为答案,但它不起作用。你能解释一下我该怎么做吗?
【问题讨论】:
-
什么不起作用?您是在提示符下输入
YES还是1?
标签: python if-statement input int