iis服务器助手广告广告
返回顶部
首页 > 资讯 > 后端开发 > Python >python, my first cod
  • 272
分享到

python, my first cod

pythoncod 2023-01-31 03:01:33 272人浏览 安东尼

Python 官方文档:入门教程 => 点击学习

摘要

# coding:utf-8from random import randintnum=randint(1,100)print "guess the right number ,so please input a number:"a=1wh

# coding:utf-8

from random import randint

num=randint(1,100)

print "guess the right number ,so please input a number:"

a=1

while a==1:

    answer=input() ##把输入赋值给answer以便条件中用到比较大小


    if answer<num :

         print "it's too small"

    if answer>num :

         print "it's too big"

    if answer==num :

         print "right"


--结束END--

本文标题: python, my first cod

本文链接: https://www.lsjlt.com/news/187360.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • python, my first cod
    # coding:utf-8from random import randintnum=randint(1,100)print "guess the right number ,so please input a number:"a=1wh...
    99+
    2023-01-31
    python cod
  • My first python appl
    ''' Authon:WSE_Gordon This application is use for the costomer to login the application. The Costomer need to input his...
    99+
    2023-01-30
    python appl
  • Head First Python (一
    建立一个数组: cast = ["Cleese","Palin","Jones","Idle"]   列出数组有多少数据项:   print(len(cast))   用列表“方法”在末尾增加一个数据项:  cast.append("...
    99+
    2023-01-30
    Head Python
  • hand first python 选读
    列表(list) 基本操作 比如说我要整理一个近期热映的电影列表: movies = ["venom", "My Neighbor Totor", "Aquaman"] print(movies) # ['venom', 'My Neig...
    99+
    2023-01-30
    选读 hand python
  • First Day Python介绍
    前言:刚开通的博客,谢谢博客园平台,管理辛苦! Python介绍 Python是一门高级的、面向对象的、解释性、脚本语言。 高级语言:贴近开发者,对应底层语言,底层语言贴近机器;java、C#、php 。 面向对象对应于面向过程,是开发人...
    99+
    2023-01-31
    Day Python
  • Python first-order-model怎么实现让照片动起来
    这篇文章主要介绍“Python first-order-model怎么实现让照片动起来”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“Python first-order-mode...
    99+
    2023-07-02
  • python datetime 写入my
    最近有个python项目需要更新mysql时间,类型是datetime,参考了网上的建议,将时间转为字符串再写入数据库。def toMysqlDateTime():    dt=datetime.datetime.now().strftim...
    99+
    2023-01-31
    python datetime
  • window-64安装python-my
    第一步:    安装MySQL-python-1.2.3.win-amd64-py2.7.exe    下载地址:http://www.codegood.com/archives/129     如果不安装这个驱动,会报以下错误:    _...
    99+
    2023-01-31
    window python
  • 解决:centos安装python-my
    使用命令pip install mysql-python的时候报错    _mysql.c:2722: warning: implicit declaration of function ‘PyMember_Set’    _mysql.c...
    99+
    2023-01-31
    centos python
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作