# user = "123"
# possword = "111"
# count = 0
#
# while count < 3:
# user_name = input("姓名:")
# possword1 = input("密码:")
# if user_name == user and possword1 == possword:
# print("登陆成功!")
# break
# else:
# print("登陆失败!")
# count += 1
# else:
# print("输入已达上限!") # a = list(range(0,100,2))
# print(a) #1、使用while循环输入1234568910
# count = 0
# while count < 10:
# count += 1
# if count == 7:
# pass
# else:
# print ("logon:",count) #2、输入1-100以内所有的奇数
#方法一:
# count = 1
# while count < 101:
# print (count)
# count += 2
#方法二:
# count = 1
# while count < 101:
# if count % 2 == 1:
# print (count)
# count += 1 #3、求1-2+3-4+5....99的所有的和
# sum = 0
# count = 1
# while count < 100:
# if count %2 == 0:
# sum - count
# else:
# sum += count
# count += 1
# print (sum) #用户登录(三次机会重试)
# user ="haha"
# possword = "123"
# count = 0
# while count < 3:
# user1 = input("姓名:")
# possword1 = input ("密码:")
# if user1 == user and possword1 == possword:
# print("登录成功!")
# else:
# print("登录失败!")
# count += 1
# print("当日次数已用完!") # #格式化输出
# name = input ("姓名:")
# age = int(input("年龄:"))
# height =int ( input("身高:"))
# # msg = "我叫%s,今年%s,身高%s"%(name,age,height)
# # print(msg)
# a = """--------info of %s-----------
# name: %s
# age: %s
# height: %s
# -----------END---------------"""%(name,name ,age,height)
# print(a) # a = range(100)
# count = 0
# for i in a :
# count = count + i
# print(count)

python—DAY1的更多相关文章

  1. python day1 python介绍,安装及运算符

    目录 python day1 1. 不同编程语言的对比 2. 为什么学python? 3. python的种类 4. python的安装(windows系统) 5. 导入模块或包 6. pyc文件 7 ...

  2. 自学Python Day1

          Day1: 强制转换,打印类型.Python2(row input)=Python3 input   input(Python2)不接受强制转换,输入和输出是一致的.加双引号是字符串,不加 ...

  3. Python day1 ---python基础1.1

    1.模块初识2..pyc是个什么鬼?3.数据类型初识 4.数据运算5.入门知识拾遗 1.模块初识 sys模块 import sys print(sys.path) #打印环境变量 'D:\\Pycha ...

  4. python day1:初识Python(一)

    一.Python 简介: Python免费.开源,面向对象的解释型语言,其语法简洁,在使用中无需考虑如何管理内存等底层问题,并且支持在linux,windows等多平台运行,Python的标准库很强大 ...

  5. Python Day1

    一.安装python windows 1.下载安装包 https://www.python.org/downloads/ 2.安装 默认安装到C盘下 3.配置环境变量 右键计算机属性---高级系统设置 ...

  6. python day1 变量的命名和赋值

    变量 一.变量的命名 1.不能以数字进行开头 2.不能包含特殊字符 3.不能是python内部的某些关键字 a = 123print(a)123 --------------------------- ...

  7. python day1 常用模块

    键盘输入: python2.7 raw_input() python3 input() 键盘输入默认为字符串,可通过例如 int(input())方式,实现类型转换. ‘密文’输入: 仅python的 ...

  8. python,Day1,基础1

    主要内容 1.python介绍 2.发展史 3.安装 4.hello world程序 5.变量 6.用户输入 7.模块 8.数据类型 9.数据运算 10.if...else语句 11.while循环 ...

  9. python———day1

    1.计算机基础:CPU,内存,硬盘,操作系统 2.python出生于应用 3.python2与python3的区别(宏观): python2:源码不标准,混乱,重复代码太多 python3:统一标准, ...

  10. python day1 之三级菜单的正确姿势

    看了几个同学有关三级菜单的实现,都是通过一级一级输出,是较为过程的实现.另外如果菜单(树形结构)更多级这样处理起来就比较麻烦了. 可以使用python强大的列表和字典,实现的更优美或简洁一些: 注:复 ...

随机推荐

  1. BP neural network optimized by PSO algorithm on Ammunition storage reliability prediction 阅读笔记

    1.BP neural network optimized by PSO algorithm on Ammunition storage reliability prediction 文献简介文献来源 ...

  2. 前端使用JS-SDK上传图片(文件)到七牛

    Qiniu-JavaScript-SDK (下文简称为 JS-SDK)适用于 :IE11.Edge.Chrome.Firefox.Safari 等浏览器,基于七牛云存储官方 API 构建,其中上传功能 ...

  3. Jekyll博客添加Valine评论

    Jekyll博客添加Valine评论 关于github搭建jekyl博客,在这里不做过多描述,详情参考: 百度搜索关键字:github搭建jekyll博客 官网:https://www.jekyll. ...

  4. Layui追加合计

    parseData: function(res) { //将原始数据解析成table组件所规定的数据 admin.restest(res); var list = new Array(); var t ...

  5. Debian9服务器安装mysql

    第一步    添加mysql软件源 下载mysql的配置文件: cd /tmp wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all ...

  6. os.path官方文档(附翻译)

    This module implements some useful functions on pathnames. To read or write files see open(), and fo ...

  7. 【性能测试】LoadRunner11安装(包含破解、汉化)

    LoadRunner安装(包含破解.汉化) 安装LoadRunner a.以解压包的方式打开[性能测试工具LR11.00].loadrunner-11.iso文件,运行“setup.ext”(花费时间 ...

  8. JS-4-if

    流程控制结构1 顺序结构 alert(10); alert(20);2 分支结构(选择结构) * IF 2.1  if(条件) { 条件成立时执行的语句 } else { 条件不成立时执行的语句 } ...

  9. 使用VirtualBox把IMG文件转换为VDI文件

    使用VirtualBox把IMG文件转换为VDI文件 首先确保已安装VirtualBox. 需要使用的命令: 语法:$ VBoxManage convertdd input.img output.vd ...

  10. D3算法编写决策树

    前言 所谓构建决策树, 就是递归的对数据集参数进行“最优特征”的选择.然后按最优特征分类成各个子数据集,继续递归. 最优特征的选择:依次计算按照各个特征进行分类以后数据集的熵,各个子数据集的熵比较后, ...