摘要:
#剪刀、石头、布 import random guess_list = ["石头", "剪刀", "布"] win_combination = [["布", "石头"], ["石头", "剪刀"], ["剪刀", "布"]] while True: people = input('请输入:石头,剪刀,布\n').strip() computer = random.choic... 阅读全文
摘要:
#剪刀、石头、布 import random guess_list = ["石头", "剪刀", "布"] win_combination = [["布", "石头"], ["石头", "剪刀"], ["剪刀", "布"]] while True: people = input('请输入:石头,剪刀,布\n').strip() computer = random.choic... 阅读全文
摘要:
题目: a,b,c,d 4名为犯罪嫌疑人,有一名是小偷,其中3个人说的是实话,一个人说的是假话,编程推断谁是小偷。 a说我不是小偷 b说c是小偷 c说小偷肯定是d d说c胡说! 阅读全文
摘要:
# coding:utf-8 with open('dist_1.txt','r',encoding= 'utf-8') as f1,open('dist_2.txt','w',encoding= 'utf-8') as f2: i=0 for line in f1: i+=1 if i%10==0: ... 阅读全文
|