冷月去哪儿

导航

 

2021年12月8日

摘要: 题目要求: 根据现实生活中的猜数字游戏的游戏规则,运用Python语言模拟实现猜数字游戏的的基本功能,请学员们参考真实的猜数字游戏规则和如下的程序运行效果图进行代码编写,以实现“数字猜猜猜”小游戏的基本功能。游戏规则介绍如下: 1、玩家根据提示进行数字区间起始位置和终止位置的输入 2、依据 1 中输 阅读全文
posted @ 2021-12-08 22:31 冷月去哪儿 阅读(727) 评论(0) 推荐(1)
 
摘要: import random from datetime import datetime def write_file(): """ 写入文件 """ file_name = "write_test.txt" f = open(file_name, 'w') f.write('hellow') f.w 阅读全文
posted @ 2021-12-08 11:41 冷月去哪儿 阅读(161) 评论(0) 推荐(0)
 
摘要: def read_file(): """读取文件""" #使用相对路径 file_name = "teamslog.txt" #使用绝对路径 file_path1 = 'D:\\02 学习\PytonStudy_new 20210815\\python-project\\porject_4\\tea 阅读全文
posted @ 2021-12-08 10:08 冷月去哪儿 阅读(133) 评论(0) 推荐(0)