![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python+人工智能
随行之旅
这个作者很懒,什么都没留下…
展开
-
day02.python中的第一个程序
第2节: python中的第一个程序操作系统:Ubuntu for linux使用工具:putty使用的编程软件:python1、首先查看python的版本号:strom@strom-virtual-machine:~$ python -VPython 2.7.122、编写代码在屏幕上输出:Hello World首先创建一个目录专门来存储python语言的代码::~/Desktop$ mkdir ...原创 2018-02-08 22:37:51 · 246 阅读 · 0 评论 -
day13.python 的列表(二)
第13节:python 的列表(二)Type "help", "copyright", "credits" or "license" for more information.>>> a = range(100)>>> a[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,原创 2018-02-23 21:45:07 · 220 阅读 · 0 评论 -
day12.python 的列表(一)
第12节:python 的列表(一)什么是listlist是处理和存放一组数据的列表用途:工资列表、购物列表、送礼列表例子1:Type "help", "copyright", "credits" or "license" for more information.>>> name = [‘Blue Polo','dashuai','tieda']>>&原创 2018-02-22 21:28:37 · 286 阅读 · 0 评论 -
day11.文件处理(二)
第11节:文件处理(二)例子:1、拷贝文件到当前文件路径下strom@strom-virtual-machine:~/Desktop/Learn_python/day07$ cp /var/log/syslog ./strom@strom-virtual-machine:~/Desktop/Learn_python/day07$ lssyslog test.txt2、查看文件内容行数strom@...原创 2018-02-20 12:36:39 · 137 阅读 · 0 评论 -
day10.文件处理(一)
第10节:文件处理(一)例子:strom@strom-virtual-machine:~/Desktop/Learn_python/day07$ pythonPython 2.7.12 (default, Dec 4 2017, 14:50:18)[GCC 5.4.0 20160609] on linux2Type "help", "copyright", "credits" or "licen...原创 2018-02-19 22:19:15 · 172 阅读 · 0 评论 -
day08.while语句
第8节:while语句while是计算机的一种基本循环模式。我们来看python的while循环模式是什么样的:例子:#!/usr/bin/env pythoni = 0while True:i=i+1if i == 50:print 'i have got to the round 50th!'continueelif i>70:breakprint i当i =0时候执行while循环,i...原创 2018-02-16 18:42:19 · 161 阅读 · 0 评论 -
day09.回顾用户交互、循环例句
第9节:回顾用户交互、循环例句1)使用raw_input、while函数写出用户交互#!/usr/bin/env pythonimport sysusername = 'strom'password = '123456'locked = 0retry_counter = 0while retry_counter<3: user = raw_input('Username:').stript...原创 2018-02-16 16:17:23 · 134 阅读 · 0 评论 -
day07.for语句
第7节:for语句1)用for循环语句输出从1到100的例子: for i in range(1,100): print i 2)用range实现奇数偶数方法: range(0,100,2) //偶数 以0开始到99 ,每位相隔2位 range(1,100,2) //奇数 以1开始到99 ,每位相隔2位 3)使用break和continue方法:break用法:跳出...原创 2018-02-14 21:03:24 · 155 阅读 · 0 评论 -
day05.流程控制if...else
第5节:流程控制if...else使用raw_input() 函数打印出来:姓名,年龄,性别,工资。以格式化的方式输出:strom@strom-virtual-machine:~/Desktop/Learn_python/day03$ cat flow_control2.py#!/usr/bin/env pythonname = raw_input('what is your name?:')a...原创 2018-02-12 20:08:48 · 180 阅读 · 0 评论 -
day01.介绍python运维开发
第1节:介绍python运维开发课程的开场白:学完次课程可以开发出高效的自动化软件、运维监控、聊天软件、网站等内容。这个运维开发跟实际上的开发是有区别的,区别在我们是实现功能,但是不能向开发那样实现高并发量,能让网站在线人数达到上亿,如果学完次课程你可以自己做出东西来。如果做运维的不会一门开发语言的话你是很难生存下去的,比如说开发人员叫运维人员部署一个刚刚开发好的应用,你确实按照开发人原创 2018-02-06 21:35:00 · 2053 阅读 · 0 评论 -
day04.用户交互
第4节:用户交互用户交互的意思就是计算机问你什么,你回答什么。例子:strom@strom-virtual-machine:~/Desktop/Learn_python/day02$ cat interactiv.py#!/usr/bin/env pythonname = raw_input("Please input your name:")if name == 'strom': print ...原创 2018-02-11 22:15:16 · 176 阅读 · 0 评论 -
day03.编程注释、导入模块
第3节:编程注释、导入模块1、什么是注释注释例子:‘Hello World!’"who are you"''' Hello,my name's strom,This is the first time to be here.'''这三个有什么区别呢?1)python的单行注释是使用:“#”2)python的多行注释是使用:“ ‘’‘ ”3)python的多行注释也可以使用:“ “”“ ”上面的例子...原创 2018-02-11 21:27:37 · 224 阅读 · 0 评论 -
day14.python的列表(三)
第14节:python的列表(三)Type "help", "copyright", "credits" or "license" for more information.>>> a = range(100)>>> a.reverse()>>> a[99, 98, 97, 96, 95, 94, 93,原创 2018-02-25 11:30:15 · 176 阅读 · 0 评论