摘要:
stuff = {'绳子':1, '火把':6, '金币': 42, '短剑': 1, '箭':12} def displayInventory(inventory): print('物品清单:') item_total = 0 for k, v in inventory.items(): prin 阅读全文
摘要:
# you can set the upperlimit number # you will guess a number for log(N) times. guess_number <- function(){ uplimit <- as.numeric(readline("猜数字的下限为1,输 阅读全文
摘要:
# you will guess a number for 7 times. # the number is between 1 and 100. guess_number <- function(){ choosed_number <- sample(x = 1:100,size = 1,repl 阅读全文