码迷,mamicode.com
首页 >  
搜索关键字:guess    ( 609个结果
运用python写一个猜数字游戏,学自小甲鱼老师
代码 """用python设计第一个游戏""" temp = input("猜猜小甲鱼心里想的是那个数字:")guess = int(temp) if guess == 8: print("你是小甲鱼心里的蛔虫吗?!") print("哼,猜中了也没奖励!")else: print("猜错了,小甲鱼 ...
分类:编程语言   时间:2020-01-18 12:52:12    阅读次数:114
【PTA】猜数字
L1-056 猜数字 (20分) 一群人坐在一起,每人猜一个 100 以内的数,谁的数字最接近大家平均数的一半就赢。本题就要求你找出其中的赢家。 输入格式: 输入在第一行给出一个正整数N(≤10?4)。随后 N 行,每行给出一个玩家的名字(由不超过8个英文字母组成的字符串)和其猜的正整数(≤ 100 ...
分类:其他好文   时间:2020-01-14 20:26:58    阅读次数:339
攻防世界 reverse Guess-the-Number
Guess-the-Number su-ctf-quals-2014 使用jd-gui 反编译jar import java.math.BigInteger; public class guess { static String XOR(String _str_one, String _str_tw ...
分类:其他好文   时间:2020-01-13 12:44:50    阅读次数:341
if_while
import random secret=random.randint(1,10) tmp=input("请输入一个数") guess=int(tmp) while guess!=secret: tmp=input("请输入一个数") guess=int(tmp) if guess==secret: ...
分类:其他好文   时间:2020-01-06 10:05:41    阅读次数:95
LeetCode 843. Guess the Word
原题链接在这里:https://leetcode.com/problems/guess-the-word/ 题目: This problem is an interactive problem new to the LeetCode platform. We are given a word lis ...
分类:其他好文   时间:2020-01-05 10:02:16    阅读次数:77
3 数字猜谜游戏
# 数字猜谜游戏 number = 7 guess = -1 print("数字猜谜游戏!") while guess != number: guess = int(input("请输入你猜的数字:")) if guess == number: print("你猜对了!") print("游戏结束" ...
分类:其他好文   时间:2019-12-29 20:21:37    阅读次数:95
用机器学习打造聊天机器人(五) 接入篇
本文是用机器学习打造聊天机器人系列的第五篇,在特性介绍中提到过,我们采用非侵入式设计,通过几个简单的 API 就可以接入聊天机器人到其他项目中,下面来看看具体步骤。 接入步骤 提供符合要求的领域问答语料的 txt 文件,按照意图类型划 分成不同的txt文件,替换本引擎自带的txt语料文件,txt语料 ...
分类:其他好文   时间:2019-12-20 18:21:25    阅读次数:95
python3之猜数字游戏
猜数字小游戏 1 # coding:utf-8 2 import random 3 4 5 #利用random生成一个1-10的随机数 6 luckeyNum = random.randint(1,10) 7 8 #限定猜的次数 9 limitCount = 3 10 11 while limitC ...
分类:编程语言   时间:2019-12-15 23:28:26    阅读次数:123
7-24 猜数字游戏
1 #include <stdio.h> 2 3 int main(void) 4 { 5 int magic_number, n; 6 int guess_number; 7 int count = 0; 8 9 scanf("%d %d", &magic_number, &n); 10 11 d ...
分类:其他好文   时间:2019-12-12 12:52:32    阅读次数:298
【Python】猜数小程序
有点沙雕 temp=input("猜猜我心里想的是哪个数字?") guess=int (temp) if guess==8: print("你是我肚里的蛔虫么?") print("哼,猜中也没有奖励") else: print("哈哈,猜错了哦!是8") print("游戏结束,不玩了!") PS: ...
分类:微信   时间:2019-12-06 21:54:31    阅读次数:186
609条   上一页 1 ... 4 5 6 7 8 ... 61 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!