print ("Hello Pythoh3")
print('我喜欢"香蕉"')
print('we\'ar go to shoping.')
print("我们发现这个\"地方\"不一样")
print("Hi" + "Tom")
##print("Hi" + 5)
print("Hi" + str(5))
print(int('8') + 5)
print(float('8.5') + 5)

print(5 + 8)
print(9 - 5)
print(3 * 6)
print(20/3)
print(4**4)

var1 = 5
print(var1)

var2 = 'hello'
print(var2)

var3 = 5 + 67
print(var3)

var4 = print('hello python 3')

print("--------------------")
#打印10以内的整数
contion = 1
while(contion<10):
print (contion)
contion +=1
print("--------------------")
#for打印1到9的数字
i = 1
for i in range(9):
print(i+1)
examplelist = [1,2,3,4,5,6,7,8,9]
for i in examplelist:
print (i)
for i in range(1,10):
print (i)
#1到100数相加
i=1
sum=0
while i<101:
sum+=i
i+=1
print (sum)
#if语句
x = 5
y = 8
z = 4
s = 5
if x < y:
print('x is less than y')

if x < y > z:
print('x is less than y and greater than z')

if x <=s:
print('x is less than or equal to s ')

python3.5.3rc1学习一的更多相关文章

  1. python3.5.3rc1学习十一:字典与模块

    #os模块import oscurDir = os.getcwd()print(curDir) os.mkdir("新建") import timetime.sleep(2)os. ...

  2. python3.5.3rc1学习十:网络请求

    #sys模块import sys sys.stderr.write('This is stderr text\n')# 因为从定向有缓冲区,所以需要以下这行代码sys.stderr.flush()sy ...

  3. python3.5.3rc1学习九:正则表达式

    # 正则表达式 ''''' 正则表达式是有一些特殊字符组成,能够帮你找到一些符合一定规则的字符串 先来了解几个符号所代表的意思 \d 匹配所有的数字 \D 匹配所有,但是数字除外 \s 空格 \S 匹 ...

  4. python3.5.3rc1学习八:文件打包

    from cx_Freeze import setup, Executable setup(name='test to exe', version = '0.1', description='test ...

  5. python3.5.3rc1学习七:多线程

    import threading def exampleFun(): #打印当前激活的线程数量 print(threading.active_count) #查看上面激活的线程是哪几个 print(t ...

  6. python3.5.3rc1学习六:画图

    # 可以设置颜色,g代表green, r代表red,y代表yellow,b代表blue# linewidth = 5,设置线条粗细 # label 设置线条名称 ##plt.plot(x,y,'b', ...

  7. python3.5.3rc1学习五:模块

    #比较大小#name:maxNumber.py#比较两个数大小#C:\Users\Anthony\AppData\Local\Programs\Python\Python36-32\Lib\site- ...

  8. python3.5.3rc1学习五:列表与元组

    #元组和列表 #元组定义x = 5,6,2,6 #or x = (5,6,2,6) #列表定义 y = [5,6,2,6] # 元组的使用,我们用return语句来演示 def exampleFunc ...

  9. python3.5.3rc1学习四:类

    class calculator: def add(x,y): return x + y print(added) def sub(x,y): return x - y print(sub) def ...

  10. python3.5.3rc1学习三:文件操作

    ##全局变量与局部变量x = 6 def printFuc(): y = 8 z =9 print(y + z) print(x) printFuc()#print(y)#常见错误##name = & ...

随机推荐

  1. [PHP] cli环境下php设置进程名字

    if (function_exists('cli_set_process_title')) { cli_set_process_title("superman php master proc ...

  2. [Go] go等待读取最后一行的数据内容

    这段代码是参照慕课网的视频教程,主要是f.Seek(0, os.SEEK_END)移动到末尾,但是里面有个小问题,当打开的文件被重新清空内容的清空下,就再也不能到读取数据了,比如在开启读取后 echo ...

  3. 问题解决:ImportError: No module named tensorflow

    环境: python3.5.3+pycharm2018.2EAP 问题描述: Pycharm编译报错 ImportError: No module named tensorflow 解决方法: ten ...

  4. luoguP4022 [CTSC2012]熟悉的文章

    题意 显然这个\(L\)是可以二分的,我们只需要判断\(L\)是否合法即可. 显然有一个\(O(n^2)\)的DP: 设\(f_i\)表示当前匹配到\(i\)的最大匹配长度. \(f_i=max(f_ ...

  5. [CF1082D]Maximum Diameter Graph

    题目描述 Description Graph constructive problems are back! This time the graph you are asked to build sh ...

  6. 洛谷 P5658 括号树

    \(50pts\) #include <cstdio> #include <cstring> #include <iostream> #include <al ...

  7. HTML连载49-清除浮动的第三种方式(内外墙法)

    一.清除浮动的第三种方式 1.隔墙法有两种​如下:外墙法和内墙法​.​ 2.外墙法 (1)在两个盒子中间添加一个额外的块级元素 (2)给这个额外添加的块级元素设置:clear:both;属性 注意点: ...

  8. node 下载 md5.js

    命令:npm install js-md5

  9. Swiper实现轮播图效果

    为了实现轮播图(carousel)效果或左右滑动显示不同的内容,我们采用Swiper来实现. 需要引入swiper.min.css和swiper.min.js,文件可从https://github.c ...

  10. ASP.NET Core 如何用 Cookie 来做身份验证

    前言 本示例完全是基于 ASP.NET Core 3.0.本文核心是要理解 Claim, ClaimsIdentity, ClaimsPrincipal,读者如果有疑问,可以参考文章 理解ASP.NE ...