使用tkinter 实现一个猜数字游戏

使用tkinter 实现一个猜数字游戏

实现效果如下
在这里插入图片描述
先导入我们要实现的模块名

import time
import tkinter as tk
import tkinter.font as tkFont
import randomLOG_LINE_NUM = 0

后面我们开始编写实现的类
类名,定位为APP类

类方法里面变量初始化,我们后面要用到的变量

 def __init__(self, root):self.initUI(root)self.initGame()self.initData()def initGame(self):self.module = True  # 升级模式  True 积分模式 False猜准即升级self.bonus = 10  # 游戏积分,初始为10self.coins = 10  # 猜数字次数,初始为10self.level = 1  # 游戏级别,初始为1self.buycoins_temp = 0  # 额外猜数次数,初始为0,未消耗永久有效self.buycoins_forever = 0  # 额外永久猜数次数,初始为0,永久有效self.status_coinsforever = True  # 额外永久猜数次数是否使用过self.status_leveup = False  # 升级状态self.burynumber = 0self.helpnumber = [1, 50, 100]  # 助猜数字self.status_helpnumber = Falseself.status_hint = Trueself.hintmin = 1self.hintmax = 100self.setDataLabel()self.GButton_submit['state'] = 'disabled'self.GButton_hint['state'] = 'disabled'self.GButton_buycoins_temp['state'] = 'disabled'self.GButton_buycoins_forever['state'] = 'disabled'self.GLineEdit_buycoins_forever['fg'] = "green"self.GLineEdit_buycoins_temp['fg'] = "green"global LOG_LINE_NUMLOG_LINE_NUM = 0self.GLineEdit_log.delete(1.0, 'end')

定义一个函数编写界面的标签

    def setDataLabel(self):self.set_bonus_lable(self.GLineEdit_bonus, self.bonus)self.set_bonus_lable(self.GLineEdit_level, self.level)self.set_bonus_lable(self.GLineEdit_coins, self.coins)self.set_bonus_lable(self.GLineEdit_buycoins_forever, self.buycoins_forever)self.set_bonus_lable(self.GLineEdit_buycoins_temp, self.buycoins_temp)if self.status_hint:self.GLabel_numrange['text'] = f'1-{self.level * 100}'else:self.GLabel_numrange['text'] = f'{self.hintmin}-{self.hintmax}'if self.status_helpnumber:self.GLabel_helpnum['text'] = f'健康游戏忠告{self.helpnumber[1]}'else:self.GLabel_helpnum['text'] = f'健康游戏忠告'self.GLabel_burynumber['text'] = f"抵制不良游戏,拒绝盗版游戏。\n注意自我保护,谨防受骗上当。\n" \f"适度游戏益脑,沉迷游戏伤身。\n合理安排时间,享受健康生活。"

初始化界面的编写

    def initUI(self, root):# setting titleroot.title("猜数字游戏  dltest@52pojie")# setting window sizewidth = 600height = 500screenwidth = root.winfo_screenwidth()screenheight = root.winfo_screenheight()alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)root.geometry(alignstr)root.resizable(width=False, height=False)ft_entry = tkFont.Font(family='Times', size=12)GLabel_770 = tk.Label(root, text="级别")GLabel_770.place(x=30, y=10, width=32, height=30)GLabel_975 = tk.Label(root, text="积分")GLabel_975.place(x=190, y=10, width=44, height=31)GLabel_917 = tk.Label(root, text="额外次数")GLabel_917.place(x=350, y=10, width=73, height=30)GLabel_30 = tk.Label(root, text="临时次数")GLabel_30.place(x=350, y=50, width=73, height=34)GLabel_37 = tk.Label(root, text="剩余猜测")GLabel_37.place(x=360, y=90, width=55, height=30)self.GButton_buycoins_forever = tk.Button(root, text="10分买一次")self.GButton_buycoins_forever.place(x=510, y=10, width=71, height=30)self.GButton_buycoins_forever["command"] = self.GButton_buycoins_forever_commandself.GButton_buycoins_temp = tk.Button(root, text="2分买一次")self.GButton_buycoins_temp.place(x=510, y=50, width=71, height=30)self.GButton_buycoins_temp["command"] = self.GButton_buycoins_temp_commandself.GLabel_result = tk.Label(root, text="猜测结果")self.GLabel_result.place(x=110, y=50, width=205, height=72)self.GLineEdit_log = tk.Text(root)  # "记录"self.GLineEdit_log.place(x=10, y=130, width=408, height=360)self.GLineEdit_numinput = tk.Entry(root, text="输入框", justify="center", font=ft_entry, validate='key',validatecommand=(root.register(self.checkInput), '%P'))self.GLineEdit_numinput.place(x=460, y=240, width=98, height=34)self.GButton_submit = tk.Button(root, text="提交")self.GButton_submit["command"] = self.GButton_submit_commandself.GButton_submit.place(x=460, y=280, width=99, height=30)self.GLabel_helpnum = tk.Label(root, text="健康游戏忠告")self.GLabel_helpnum.bind('<Button-1>', self.changeHelpStatus)self.GLabel_helpnum.place(x=430, y=370, width=160, height=30)self.GLabel_burynumber = tk.Label(root, text="抵制不良游戏,拒绝盗版游戏。\n注意自我保护,谨防受骗上当。\n""适度游戏益脑,沉迷游戏伤身。\n合理安排时间,享受健康生活。")ft = tkFont.Font(family='宋体', size=8)self.GLabel_burynumber["font"] = ftself.GLabel_burynumber["fg"] = "#5fb878"self.GLabel_burynumber.bind('<Button-1>', self.GLabel_getburynumber)self.GLabel_burynumber.place(x=430, y=400, width=171, height=75)self.GButton_star = tk.Button(root, text="开始游戏")self.GButton_star.place(x=510, y=90, width=72, height=30)self.GButton_star["command"] = self.GButton_star_commandGLabel_512 = tk.Label(root, text="本次数字区间")GLabel_512.place(x=450, y=170, width=120, height=30)self.GLabel_numrange = tk.Label(root, text="1-100")  # "1-100"self.GLabel_numrange.place(x=450, y=200, width=122, height=30)self.GLineEdit_level = tk.Entry(root, state='readonly', justify="center", font=ft_entry)  # "级别"self.GLineEdit_level.place(x=70, y=10, width=90, height=30)self.GLineEdit_bonus = tk.Entry(root, justify="center", font=ft_entry)  # "积分"self.GLineEdit_bonus.place(x=240, y=10, width=81, height=30)self.GLineEdit_buycoins_forever = tk.Entry(root, justify="center", font=ft_entry)  # 额外self.GLineEdit_buycoins_forever.place(x=420, y=10, width=72, height=30)self.GLineEdit_buycoins_temp = tk.Entry(root, justify="center", font=ft_entry)  # 临时self.GLineEdit_buycoins_temp.place(x=420, y=50, width=72, height=30)self.GLineEdit_coins = tk.Entry(root, justify="center", font=ft_entry)  # 剩余self.GLineEdit_coins.place(x=420, y=90, width=72, height=30)self.GButton_reset = tk.Button(root, text="重玩")self.GButton_reset.place(x=30, y=70, width=61, height=30)self.GButton_reset["command"] = self.GButton_reset_commandself.GButton_hint = tk.Button(root, text="5积分缩小范围1次")self.GButton_hint.place(x=430, y=130, width=149, height=30)self.GButton_hint["command"] = self.GButton_hint_command

由于代码太多了
只贴上上面的代码

下面是完整代码

# -*- coding:utf-8 -*-
# @FileName  :myguestnumberUI.py
# @Time      :2022/7/23 12:03
# @AuThor     :dltest@52pojie
import time
import tkinter as tk
import tkinter.font as tkFont
import randomLOG_LINE_NUM = 0class App:def __init__(self, root):self.initUI(root)self.initGame()self.initData()def initGame(self):self.module = True  # 升级模式  True 积分模式 False猜准即升级self.bonus = 10  # 游戏积分,初始为10self.coins = 10  # 猜数字次数,初始为10self.level = 1  # 游戏级别,初始为1self.buycoins_temp = 0  # 额外猜数次数,初始为0,未消耗永久有效self.buycoins_forever = 0  # 额外永久猜数次数,初始为0,永久有效self.status_coinsforever = True  # 额外永久猜数次数是否使用过self.status_leveup = False  # 升级状态self.burynumber = 0self.helpnumber = [1, 50, 100]  # 助猜数字self.status_helpnumber = Falseself.status_hint = Trueself.hintmin = 1self.hintmax = 100self.setDataLabel()self.GButton_submit['state'] = 'disabled'self.GButton_hint['state'] = 'disabled'self.GButton_buycoins_temp['state'] = 'disabled'self.GButton_buycoins_forever['state'] = 'disabled'self.GLineEdit_buycoins_forever['fg'] = "green"self.GLineEdit_buycoins_temp['fg'] = "green"global LOG_LINE_NUMLOG_LINE_NUM = 0self.GLineEdit_log.delete(1.0, 'end')def setDataLabel(self):self.set_bonus_lable(self.GLineEdit_bonus, self.bonus)self.set_bonus_lable(self.GLineEdit_level, self.level)self.set_bonus_lable(self.GLineEdit_coins, self.coins)self.set_bonus_lable(self.GLineEdit_buycoins_forever, self.buycoins_forever)self.set_bonus_lable(self.GLineEdit_buycoins_temp, self.buycoins_temp)if self.status_hint:self.GLabel_numrange['text'] = f'1-{self.level * 100}'else:self.GLabel_numrange['text'] = f'{self.hintmin}-{self.hintmax}'if self.status_helpnumber:self.GLabel_helpnum['text'] = f'健康游戏忠告{self.helpnumber[1]}'else:self.GLabel_helpnum['text'] = f'健康游戏忠告'self.GLabel_burynumber['text'] = f"抵制不良游戏,拒绝盗版游戏。\n注意自我保护,谨防受骗上当。\n" \f"适度游戏益脑,沉迷游戏伤身。\n合理安排时间,享受健康生活。"def initUI(self, root):# setting titleroot.title("猜数字游戏  dltest@52pojie")# setting window sizewidth = 600height = 500screenwidth = root.winfo_screenwidth()screenheight = root.winfo_screenheight()alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)root.geometry(alignstr)root.resizable(width=False, height=False)ft_entry = tkFont.Font(family='Times', size=12)GLabel_770 = tk.Label(root, text="级别")GLabel_770.place(x=30, y=10, width=32, height=30)GLabel_975 = tk.Label(root, text="积分")GLabel_975.place(x=190, y=10, width=44, height=31)GLabel_917 = tk.Label(root, text="额外次数")GLabel_917.place(x=350, y=10, width=73, height=30)GLabel_30 = tk.Label(root, text="临时次数")GLabel_30.place(x=350, y=50, width=73, height=34)GLabel_37 = tk.Label(root, text="剩余猜测")GLabel_37.place(x=360, y=90, width=55, height=30)self.GButton_buycoins_forever = tk.Button(root, text="10分买一次")self.GButton_buycoins_forever.place(x=510, y=10, width=71, height=30)self.GButton_buycoins_forever["command"] = self.GButton_buycoins_forever_commandself.GButton_buycoins_temp = tk.Button(root, text="2分买一次")self.GButton_buycoins_temp.place(x=510, y=50, width=71, height=30)self.GButton_buycoins_temp["command"] = self.GButton_buycoins_temp_commandself.GLabel_result = tk.Label(root, text="猜测结果")self.GLabel_result.place(x=110, y=50, width=205, height=72)self.GLineEdit_log = tk.Text(root)  # "记录"self.GLineEdit_log.place(x=10, y=130, width=408, height=360)self.GLineEdit_numinput = tk.Entry(root, text="输入框", justify="center", font=ft_entry, validate='key',validatecommand=(root.register(self.checkInput), '%P'))self.GLineEdit_numinput.place(x=460, y=240, width=98, height=34)self.GButton_submit = tk.Button(root, text="提交")self.GButton_submit["command"] = self.GButton_submit_commandself.GButton_submit.place(x=460, y=280, width=99, height=30)self.GLabel_helpnum = tk.Label(root, text="健康游戏忠告")self.GLabel_helpnum.bind('<Button-1>', self.changeHelpStatus)self.GLabel_helpnum.place(x=430, y=370, width=160, height=30)self.GLabel_burynumber = tk.Label(root, text="抵制不良游戏,拒绝盗版游戏。\n注意自我保护,谨防受骗上当。\n""适度游戏益脑,沉迷游戏伤身。\n合理安排时间,享受健康生活。")ft = tkFont.Font(family='宋体', size=8)self.GLabel_burynumber["font"] = ftself.GLabel_burynumber["fg"] = "#5fb878"self.GLabel_burynumber.bind('<Button-1>', self.GLabel_getburynumber)self.GLabel_burynumber.place(x=430, y=400, width=171, height=75)self.GButton_star = tk.Button(root, text="开始游戏")self.GButton_star.place(x=510, y=90, width=72, height=30)self.GButton_star["command"] = self.GButton_star_commandGLabel_512 = tk.Label(root, text="本次数字区间")GLabel_512.place(x=450, y=170, width=120, height=30)self.GLabel_numrange = tk.Label(root, text="1-100")  # "1-100"self.GLabel_numrange.place(x=450, y=200, width=122, height=30)self.GLineEdit_level = tk.Entry(root, state='readonly', justify="center", font=ft_entry)  # "级别"self.GLineEdit_level.place(x=70, y=10, width=90, height=30)self.GLineEdit_bonus = tk.Entry(root, justify="center", font=ft_entry)  # "积分"self.GLineEdit_bonus.place(x=240, y=10, width=81, height=30)self.GLineEdit_buycoins_forever = tk.Entry(root, justify="center", font=ft_entry)  # 额外self.GLineEdit_buycoins_forever.place(x=420, y=10, width=72, height=30)self.GLineEdit_buycoins_temp = tk.Entry(root, justify="center", font=ft_entry)  # 临时self.GLineEdit_buycoins_temp.place(x=420, y=50, width=72, height=30)self.GLineEdit_coins = tk.Entry(root, justify="center", font=ft_entry)  # 剩余self.GLineEdit_coins.place(x=420, y=90, width=72, height=30)self.GButton_reset = tk.Button(root, text="重玩")self.GButton_reset.place(x=30, y=70, width=61, height=30)self.GButton_reset["command"] = self.GButton_reset_commandself.GButton_hint = tk.Button(root, text="5积分缩小范围1次")self.GButton_hint.place(x=430, y=130, width=149, height=30)self.GButton_hint["command"] = self.GButton_hint_commanddef initData(self):passdef GButton_buycoins_forever_command(self):if self.bonus >= 20 and self.buycoins_forever < 10:self.bonus -= 10self.buycoins_forever += 1self.write_log_to_Text(f'购买成功,已为您增加永久次数:1')if self.status_coinsforever:self.write_log_to_Text(f'本局可以使用购买得永久次数。')else:self.write_log_to_Text(f'永久次数已部份使用,下局可用新购次数。')else:if self.bonus < 20:self.write_log_to_Text(f'购买失败!请预留至少10点游戏积分!您目前游戏积分:{self.bonus}')elif self.buycoins_forever >= 10:self.write_log_to_Text(f'购买失败!额外猜数次数存储上限为10次!')self.setDataLabel()def GButton_buycoins_temp_command(self):if self.bonus >= 12:self.bonus -= 2self.buycoins_temp += 1self.write_log_to_Text(f'购买成功,已为您增加临时次数:1')else:self.write_log_to_Text(f'购买失败!请预留至少10点游戏积分!您目前游戏积分:{self.bonus}')self.setDataLabel()def changeHelpStatus(self, event):self.status_helpnumber = not self.status_helpnumberself.setDataLabel()def GLabel_getburynumber(self, event):self.GLabel_burynumber['text'] = self.burynumberdef GButton_submit_command(self):if self.bonus <= 0:self.write_log_to_Text(f'您的游戏积分为0,GAME OVER!重玩请点击按钮【重玩】')# self.write_log_to_Text('很遗憾!您没有猜对数字!埋藏的数字为:{input:3}')returninput = self.GLineEdit_numinput.get()self.GLineEdit_numinput.delete(0, 'end')x = 0if input:try:x = int(input)except:self.write_log_to_Text(f'请输入整数')returnelse:self.write_log_to_Text(f'未输入数字')returnif x > self.burynumber:self.GLabel_result['fg'] = "#ff7800"ft = tkFont.Font(family='Times', size=12)self.GLabel_result["font"] = ftself.GLabel_result['text'] = "大了"self.write_log_to_Text(f'您猜的数[{input:>3}]太大了!扣除1点游戏积分,剩余游戏积分:{self.bonus - 1}')self.helpnumber[2] = xself.helpnumber[1] = int((self.helpnumber[0] + self.helpnumber[2]) / 2)elif x < self.burynumber:self.GLabel_result['text'] = "小了"self.write_log_to_Text(f'您猜的数[{input:>3}]太小了!扣除1点游戏积分,剩余游戏积分:{self.bonus - 1}')self.helpnumber[0] = xself.helpnumber[1] = int((self.helpnumber[0] + self.helpnumber[2]) / 2)else:self.status_leveup = Trueprint("神啦!您居然猜对了")self.GLabel_result['text'] = "猜对了"self.write_log_to_Text(f'神啦!您居然猜对了!埋藏的数确实是[{input:>3}]。')self.write_log_to_Text(f'奖励10点游戏积分,剩余游戏积分:{self.bonus + 10}')self.setGameStaus()def setGameStaus(self):self.bonus -= 1if self.status_leveup:self.bonus += 11self.coins = 10self.GLineEdit_buycoins_forever['fg'] = "green"else:self.coins -= 1if self.coins == 0 and self.bonus > 0 and not self.status_leveup:if self.status_coinsforever and self.buycoins_forever > 0:self.status_coinsforever = Falseself.GLineEdit_buycoins_forever['fg'] = "red"self.coins += self.buycoins_foreverself.write_log_to_Text(f'使用道具“主角光环”成功!额外增加[{self.buycoins_forever}]次猜测,请继续加油!')elif self.buycoins_temp > 0:self.coins += 1self.buycoins_temp -= 1self.write_log_to_Text(f'幸运加持!额外增加[{1}]次猜测,请继续加油!')else:self.write_log_to_Text(f'很遗憾!您没有猜对数字!埋藏的数字为:{self.burynumber:>3}')self.write_log_to_Text(f'您的猜测次数为0,GAME OVER!重玩请点击按钮【重玩】')self.GameOver()self.uplevel()if self.status_leveup:self.GButton_star_command()self.setDataLabel()  # 刷新显示def GButton_hint_command(self):if self.bonus > 5:self.status_hint = Falseself.bonus -= 5min = random.randint(1, 25)max = random.randint(1, 25)hintmin = 1if self.burynumber - self.hintmin > min:hintmin = self.burynumber - minelse:hintmin = self.burynumber - random.randint(1, (self.burynumber - self.hintmin))hintmax = self.level * 100if self.hintmax - self.burynumber > max:hintmax = self.burynumber + maxelse:hintmax = self.burynumber + random.randint(1, (self.hintmax - self.burynumber))if hintmin < 0:hintmin = random.randint(1, self.burynumber)if hintmax > self.level * 100:hintmax = random.randint(self.burynumber, self.level * 100)self.hintmin = hintminself.hintmax = hintmaxself.write_log_to_Text(f'-----------消耗5点游戏积分获取埋藏数字区间提示 ------')self.write_log_to_Text(f'埋藏的数字在「{self.hintmin}~{self.hintmax}」之间,剩余游戏积分:{self.bonus}')else:self.write_log_to_Text(f'购买失败!请预留至少5点游戏积分!您目前游戏积分:{self.bonus}')self.setDataLabel()def GButton_star_command(self):self.burynumber = self.BuryNumber(self.level)self.GButton_star['state'] = 'disabled'self.GButton_submit['state'] = 'active'self.GButton_hint['state'] = 'active'self.GButton_buycoins_temp['state'] = 'active'self.GButton_buycoins_forever['state'] = 'active'self.status_hint = Trueself.status_leveup = Falseself.status_coinsforever = Trueprint(self.level)self.helpnumber[2] = self.level * 100self.helpnumber[0] = 1self.helpnumber[1] = int((self.helpnumber[0] + self.helpnumber[2]) / 2)print(self.helpnumber)def GButton_reset_command(self):self.bonus = 10self.level = 1self.set_bonus_lable(self.GLineEdit_bonus, self.bonus)self.set_bonus_lable(self.GLineEdit_level, self.level)self.GButton_star['state'] = 'active'self.initGame()self.setDataLabel()# 根据游戏级别埋藏数字def BuryNumber(self, level):return random.randint(1, level * 100)def checkInput(self, char):if (char.isdigit() or char == ""):return Trueelse:return Falsedef write_log_to_Text(self, logmsg):global LOG_LINE_NUMlogmsg_in = str(logmsg) + "\n"  # 换行if LOG_LINE_NUM <= 24:self.GLineEdit_log.insert('end', logmsg_in)LOG_LINE_NUM = LOG_LINE_NUM + 1else:self.GLineEdit_log.delete(1.0, 2.0)self.GLineEdit_log.insert('end', logmsg_in)def set_bonus_lable(self, _Edit, value):_Edit.config(state='normal')_Edit.delete(0, 'end')_Edit.insert(0, f"{value}")_Edit.config(state='readonly')def GameOver(self):self.GButton_submit['state'] = 'disabled'# 根据游戏积分提升游戏级别def uplevel(self):level = self.levelif self.status_leveup and not self.module:level += 1else:level = self.bonus // 10 + 1if level > self.level:self.level = levelself.write_log_to_Text(f'-----------游戏难度升级至:{self.level}  ------')if __name__ == "__main__":root = tk.Tk()app = App(root)root.mainloop()

上面代码还有部分没有完善功能,
完整功能代码打包成exe上次到我的资源
可以去这个链接下载
https://download.csdn.net/download/Deng872347348/86336872

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/63387.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

skynet开发一个猜数字游戏

skynet开发一个猜数字游戏 游戏简介接口设计和实现agent服务接口room服务接口hall服务接口redis服务gate服务接口 编写skynet的config文件游戏演示总结 游戏简介 猜数字游戏目的是掌握 actor 模型开发思路。 规则&#xff1a; 满三个人开始游戏&#xff0c;游戏开始后不能退…

数字人全集

Mixlab 请查阅 Mixlab社群数字人讨论合辑&#xff0c;文末附有合辑资料汇总&#xff5e; 数字人专题分享合辑目录 #01 数字人驱动方式 离线式驱动实时驱动跨平台数字人形象统一接入工具 #02 数字人虚拟偶像制作 虚拟偶像创作与运营指南虚拟形象制作开发工具 #03 数字人实业应用…

哈登砍58分遇“里程悲” 火箭破单场3分出手纪录

资料图&#xff1a;哈登遭遇“里程悲” 资料图&#xff1a;哈登遭遇“里程悲” 中新网客户端1月17日 在17日进行的美职篮常规赛中&#xff0c;虽然哈登在45分钟的出场时间里拿到58分、6次助攻以及10个篮板的恐怖数据&#xff0c;但休斯敦火箭还是以142&#xff1a;145加时不敌…

连续21场30+ 哈登砍61分创个人生涯得分记录

资料图&#xff1a;哈登。 中新网1月24日电 北京时间24日上午&#xff0c;2018-2019赛季NBA常规赛继续进行。火箭客场以114&#xff1a;110力克尼克斯&#xff0c;此役哈登砍下61分、15个篮板和5次抢断&#xff0c;创造个人职业生涯得分记录。 上半场比赛&#xff0c;哈登21投…

NBA上周最佳球员:哈登场均54分 拉塞尔首次入选

哈登近期的表现惊艳全联盟。(资料图) 中新网1月22日电 北京时间22日凌晨&#xff0c;NBA官方公布了上一周东西部最佳球员&#xff0c;布鲁克林篮网队丹吉洛-拉塞尔与休斯顿火箭队詹姆斯-哈登分别当选。这是哈登赛季第3次当选周最佳。 拉塞尔上周率领篮网队取得3胜0负&#x…

火箭主帅德安东尼赞哈登低位防守:他是控球中锋

资料图&#xff1a;哈登。 中新网北京1月28日电 北京时间1月28日&#xff0c;火箭103&#xff1a;98战胜魔术。据NBA中文网报道&#xff0c;火箭主帅德安东尼在赛后夸赞了球队当家核心哈登的低位防守。 本场比赛&#xff0c;克里斯-保罗在缺席了17场比赛之后回归&#xff0c;…

哈登骑小牛刷街是营销炒作?你可能想多了

近日&#xff0c;哈登骑小牛电动车在上海刷街的视频和图片轰炸了微博、百度等各大平台&#xff0c;广大网友插科打诨之余不免猜测&#xff0c;这肯定是小牛电动的一次精心营销&#xff1f;虽然不排除这种可能&#xff0c;但我觉得&#xff0c;这更像是哈登自己的炒作。 哈登和…

接口怎么分批量同步数据_常规赛场均34分,季后赛场均31分,数据下滑的哈登到底怎么了...

詹姆斯哈登再一次因为季后赛中不理想的表现被球迷们推上了风口浪尖&#xff0c;其实哈登在这轮系列赛中的数据表现还是挺不错的&#xff0c;场均31.8分6.8个篮板和7.8次助攻的数据已经可以和历史上很多伟大名宿相提并论了&#xff0c;但是就算打出了这样的数据&#xff0c;球队…

姚明当年这罚球有多难?哈登欧文难复制,吉诺比利:罚不进真难

体育竞技&#xff0c;是力量和技巧的比拼&#xff0c;是心态和经验的比拼&#xff01;面对勇者&#xff0c;每个体育健儿都是雄鹰&#xff0c;他们能够勇猛的搏击长空&#xff0c;让啸声响彻云霄&#xff1b;面对智者&#xff0c;每个体育健儿都是蛟龙&#xff0c;能够畅游四海…

盘一盘 Python 系列 10 - Keras (上)

本文含 12119 字&#xff0c; 64 图表截屏 建议阅读 62 分钟 0 引言 本文是 Python 系列的第十三篇&#xff0c;也是深度学习框架的第一篇 - Keras。 深度学习之 Keras深度学习之 TensorFlow深度学习之 PyTorch深度学习之 MXnet Keras 是一个高级的 (high-level) 深度学习框架…

这届全明星,把NBA又燃回来了

第一个罚球&#xff0c;戴维斯出手后&#xff0c;听到哐当医生&#xff0c;皮球掉了出来。我又紧张了。微信群了很多人开始发消息&#xff0c;说詹姆斯队又要输了。回到比赛。戴维斯当时没有任何微笑&#xff0c;我估计他内心也是紧张的&#xff0c;他有点埋怨哈登&#xff0c;…

CTR---DIN原理,及deepctr组网实现DIN

文章目录 原理小结deepctr实现DIN&#xff08;基于df的数据格式&#xff09; 原理小结 Candidate Ad item&#xff0c;在这指广告特征。 User profile features 代表用户的特征。 Context Features 代表跟场景有关的特征&#xff0c;比如时间戳之类的。 User Behaviors 代表…

第02章 PyTorch基础知识

文章目录 第02章 Pytorch基础知识2.1 张量2.2 自动求导2.3 并行计算简介2.3.1 为什么要做并行计算2.3.2 CUDA是个啥2.3.3 做并行的方法 补充&#xff1a;通过股票数据感受张量概念。 本图文是Datawhale组队学习Pytorch的学习笔记&#xff0c;主要内容包括张量的概念&#xff08…

大胆预测NBA2011-2012季后赛形势

以下都是我个人的看法,纯属猜测。希望大家不喜勿喷,有相同喜好的爱好者也可以把自己的想法写在评论上,大家一起讨论哦哈哈 NBA季后赛第一轮正在如火如荼的进行当中,除了雷霆已经以4:0的大比分淘汰了卫冕冠军小牛队之外,其他14支球队的争夺也已经到了最后的阶段了,现在先…

通过KNN算法预测数据所属NBA球员——Python实现

项目介绍 通过得分&#xff0c;篮板&#xff0c;助攻&#xff0c;出场时间四个数据来预测属于哪位球员。 选取了LeBron James,Chris Paul,James Harden,Kevin Love,Dwight Howard五位球员单场数据。 数据来源 本文使用数据全部来自于科赛网 &#xff0c;字段解释如下&#xff1…

java的后撤建_后撤步难学?做好这几点,你的后撤步也能像哈登一样强!

原标题&#xff1a;后撤步难学&#xff1f;做好这几点&#xff0c;你的后撤步也能像哈登一样强&#xff01; 后撤步投篮的一些要点&#xff0c; 可得好好学学&#xff0c; 没有一招拿得出手的后撤步&#xff0c; 如何在球场上立足。 中国孔子说"性相近也&#xff0c;习相远…

利用Python从数据分析的角度告诉你NBA2018-2019常规赛季为什么字母哥比哈登强?

目录 基于NBA2018-2019赛季常规赛球员数据进行数据挖掘 1. 挖掘背景与目标 1.1 挖掘背景 1.2 挖掘目标 2. 分析方法与过程 2.1 分析方法&#xff08;主成分分析&#xff09; 2.1 分析过程 3. 获取数据 4. 数据探索性分析与预处理 4.1探索性分析 4.1.1 条形图分析 4…

AI篮球裁判火了,走步算得特别准,就问哈登慌不慌

Alex 发自 凹非寺量子位 | 公众号 QbitAI 打篮球的友友们应该知道&#xff0c;走步是比赛中最常见的违规之一。 为了更好地监测篮球比赛中球员是否出现走步行为&#xff0c;一位网名叫Ayush Pai的小哥&#xff08;我们就叫他AP哥吧&#xff09;搞出了一个AI裁判。 如你所见&…

预测2019-2020赛季常规赛MVP

受新冠肺炎影响&#xff0c;2019-2020赛季NBA已经处于停摆状态&#xff0c;是否以及何时能复赛还不清楚。相关的各项评选如常规赛MVP、最佳阵容、最佳防守等也由于疫情暂停了。按照往年的赛程节奏&#xff0c;此时也应该进入常规赛收官阶段了。本文利用历史数据和本赛季常规赛已…

今天nba预测分析_焰神体育【NBA】赛事推荐预测分析:1月15日《开拓者》vs《步行者》...

波特兰开拓者(主) VS 印第安纳步行者 比赛时间&#xff1a;2021 1月15日 11:00 印第安纳步行者队 周四的大新闻是詹姆斯哈登在连续几周表现不佳后终于如愿以获&#xff0c;被交易到布鲁克林篮网队。 印第安纳步行者队用奥拉迪波交换莱弗里特到火箭。 凯文-普理查德可以说是今天…