<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[runtulaoye的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/runtulaoye</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; runtulaoye]]></copyright><item><title><![CDATA[python#使用thread模块创建线程]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118466682</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118466682</guid><author>runtulaoye</author><pubDate>Sun, 04 Jul 2021 20:12:50 +0800</pubDate><description><![CDATA[import _thread
from time import sleep, ctime
def thread1():
    print('线程1开始：', ctime())
    print('线程1挂起4秒')
    sleep(4)
    print('线程1结束：', ctime())
def thread2():
    print('线程2开始：', ctime())
    print('线程2挂起2秒')
    sleep(2)
    print('线程2结束：', ctime(]]></description><category></category></item><item><title><![CDATA[python#斐波那契数列]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118444881</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118444881</guid><author>runtulaoye</author><pubDate>Sat, 03 Jul 2021 20:43:54 +0800</pubDate><description><![CDATA[def fibonacci_seq(n):
    if n == 1 or n == 2:
        return 1
    else:
        return fibonacci_seq(n - 1) + fibonacci_seq(n - 2)
nums = [ ]
for i in range(1, 11):
    nums.append(fibonacci_seq(i))
print(nums)


]]></description><category></category></item><item><title><![CDATA[用pytho写出0~100里面所有的奇数。]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118440860</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118440860</guid><author>runtulaoye</author><pubDate>Sat, 03 Jul 2021 15:40:10 +0800</pubDate><description><![CDATA[a = []
for i in range(1, 100 + 1, 2):
    a.append(i)
print('列表a:', a)
b = []
for j in range(1, 100 + 1):
    if j % 2 == 1:
        b.append(j)
print('列表b:', b)


]]></description><category></category></item><item><title><![CDATA[python编写 input()和 output()函数输入，输出 5 个学生的数据记录。]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118369141</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118369141</guid><author>runtulaoye</author><pubDate>Wed, 30 Jun 2021 20:45:24 +0800</pubDate><description><![CDATA[#编写 input()和 output()函数输入，输出 5 个学生的数据记录。
student_list = []
def std_input():
    name = input('student name:')
    number = input('student number:')
    score = input('student score:')
    student_dict = {'name': name, 'number':number, 'score':score}
    st]]></description><category></category></item><item><title><![CDATA[python题目n 个人围成一圈，顺序排号。从第一个人开始报数（从 1 到 3 报数），凡报到 3 的人退出圈子，问最后留下的是原来第几号的那位。]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118368733</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118368733</guid><author>runtulaoye</author><pubDate>Wed, 30 Jun 2021 20:20:28 +0800</pubDate><description><![CDATA[# n 个人围成一圈，顺序排号。从第一个人开始报数（从 1 到 3 报数），凡报到 3 的人退出圈子，问最后留下的是原来第几号的那位。
n = int(input("please set the number of players:"))
game = []
for i in range(n):
    game.append(i + 1)
sign = 0
order = 0
out_players = 0
while out_players &lt; n - 1:
    if game[order] ]]></description><category></category></item><item><title><![CDATA[PYTHON#按照大小顺序输出三个数字]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118366389</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118366389</guid><author>runtulaoye</author><pubDate>Wed, 30 Jun 2021 17:46:58 +0800</pubDate><description><![CDATA[#按照大小顺序输出三个数字
n1 = int(input(‘n1 = :’))
n2 = int(input(‘n2 = :’))
n3 = int(input('n3 = '))
def swap(p1, p2):
return p2, p1
if n1 &gt; n2:n1, n2 = swap(n1, n2)
if n1 &gt; n3:n1,n3 = swap(n1, n3)
if n2 &gt; n3:n2, n3 = swap(n2, n3)
print(n1, n2, n3)

...]]></description><category></category></item><item><title><![CDATA[python#利用ellipse 和rectan 画图]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118304922</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118304922</guid><author>runtulaoye</author><pubDate>Mon, 28 Jun 2021 15:28:51 +0800</pubDate><description><![CDATA[#利用ellipse 和rectan 画图
if __name__ == '__main__':
    from tkinter import *
    canvas = Canvas(width = 400, height = 600, bg = 'white')
    left = 20
    right = 50
    top = 50
    num = 15
    for i in range(num):
        canvas.create_oval(250- right, 2]]></description><category></category></item><item><title><![CDATA[python用tkinter画椭圆]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118297687</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118297687</guid><author>runtulaoye</author><pubDate>Mon, 28 Jun 2021 11:18:22 +0800</pubDate><description><![CDATA[#画椭圆
from tkinter import *
top = 180
bottom = 180
canvas = Canvas(width = 600, height = 600, bg = 'white')
for i in range(10):
    canvas.create_oval(300-top, 300-bottom, 300 + top, 200+bottom)
    top -= 5
    bottom += 5
canvas.pack()
mainloop()


]]></description><category></category></item><item><title><![CDATA[python打印出杨辉三角]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118280613</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118280613</guid><author>runtulaoye</author><pubDate>Sun, 27 Jun 2021 21:45:15 +0800</pubDate><description><![CDATA[#打印出杨辉三角
N = [1]
for i in range(10):#打印10行
    M = [str(i) for i in N]#将数组转化为字符串
    print(','.join(M))#打印直角三角形样子的杨辉三角
    M = ''.join(M)#转化为以空格为间隔的字符串
    M_middle = M.center(100)#将字符串编程一个长度为100的字符串， 并使其居中
    print(M_middle)#打印等腰三角形样子的杨辉三角
    N.append(0]]></description><category></category></item><item><title><![CDATA[python#计算字符串长度]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118280496</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118280496</guid><author>runtulaoye</author><pubDate>Sun, 27 Jun 2021 21:38:29 +0800</pubDate><description><![CDATA[#计算字符串长度
s = 'string'
print(len(s))


]]></description><category></category></item><item><title><![CDATA[python#输出一个随机数]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118275228</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118275228</guid><author>runtulaoye</author><pubDate>Sun, 27 Jun 2021 15:39:59 +0800</pubDate><description><![CDATA[#输出一个随机数
import random
a = random.uniform(100, 200)
print(a)


]]></description><category></category></item><item><title><![CDATA[python使用lambda创建函数]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118275051</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118275051</guid><author>runtulaoye</author><pubDate>Sun, 27 Jun 2021 15:31:18 +0800</pubDate><description><![CDATA[#使用lambda创建函数
f1 = lambda a, b: a + b
f2 = lambda a, b, c, d : a + b + c -(c + d)
a, b, c, d = 21, 32, 44, 28
print(f1(a, b,))
print(f2(a, b, c, d))


]]></description><category></category></item><item><title><![CDATA[PYTHON#数字比较]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118274995</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118274995</guid><author>runtulaoye</author><pubDate>Sun, 27 Jun 2021 15:28:25 +0800</pubDate><description><![CDATA[#数字比较
a = float(input('Input number a:'))
b = float(input('Input number b:'))
if a &gt; b:
    print('d%&gt;d%'%(a, b))
elif a &lt; 1b:
    print('d%&lt;d%'%(a, b))
else:
    print('Error')


]]></description><category></category></item><item><title><![CDATA[python变量值互换]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118256288</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118256288</guid><author>runtulaoye</author><pubDate>Sat, 26 Jun 2021 23:26:11 +0800</pubDate><description><![CDATA[#变量值互换
def f(a, b):
    a, b = b, a
    return a, b
x = 12
y = 32
x, y = f(x, y)
print(x, y)


]]></description><category></category></item><item><title><![CDATA[PYTHON输入数字的平方，如果平方运算后小于50则退出]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118256220</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118256220</guid><author>runtulaoye</author><pubDate>Sat, 26 Jun 2021 23:19:37 +0800</pubDate><description><![CDATA[TRUE = 1
FALSE = 0
def PF(a):
    return a * a
b = 1
while b:
    num = int(input('输入一个数字：'))
    print('运算结果为：', PF(num))
    if PF(num) &gt;= 50:
        b = TRUE
    else:
        b = FALSE


]]></description><category></category></item><item><title><![CDATA[python#统计1到100之和。]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118256142</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118256142</guid><author>runtulaoye</author><pubDate>Sat, 26 Jun 2021 23:11:15 +0800</pubDate><description><![CDATA[#统计1到100之和。
x = 101 * 50
print(x)
y = 0
for i in range(1, 101):
    y += i
print(y)


]]></description><category></category></item><item><title><![CDATA[python#矩阵相加，两个3行3列的矩阵，实现其对应位置的数据相加，并返回一个新矩阵]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118256122</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118256122</guid><author>runtulaoye</author><pubDate>Sat, 26 Jun 2021 23:09:12 +0800</pubDate><description><![CDATA[#矩阵相加，两个3行3列的矩阵，实现其对应位置的数据相加，并返回一个新矩阵
X = [[12, 7, 3],
     [4, 5, 6],
     [7, 8, 9]]
Y = [[5, 8, 1],
     [6, 7, 3],
     [4, 5, 9]]
Z = [[0, 0, 0],[0, 0, 0],[0, 0, 0]]
for i in range(3):
    for j in range(3):
        Z[i][j] = X[i][j] + Y[i][j]
print(Z]]></description><category></category></item><item><title><![CDATA[Python逆序输出列表]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118245962</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118245962</guid><author>runtulaoye</author><pubDate>Sat, 26 Jun 2021 12:02:28 +0800</pubDate><description><![CDATA[#逆序输出列表
#将一个数组逆序输出
list = [1,3,2,4,5,4,122, 32, 93]
list_re=list[::-1]
print(list_re)





]]></description><category></category></item><item><title><![CDATA[python矩阵运算,求一个3*3矩阵主对角线元素之和]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118156662</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118156662</guid><author>runtulaoye</author><pubDate>Wed, 23 Jun 2021 16:45:16 +0800</pubDate><description><![CDATA[#矩阵运算
#求一个3*3矩阵主对角线元素之和
a = []
sum = 0.0
for i in range(3):
    a.append([])
    for j in range(3):
        a[i].append(float(input("number:")))
for i in range(3):
    sum += a[i][i]
print(a)
print(sum)


]]></description><category></category></item><item><title><![CDATA[python 对10个数进行排序]]></title><link>https://blog.youkuaiyun.com/runtulaoye/article/details/118156464</link><guid>https://blog.youkuaiyun.com/runtulaoye/article/details/118156464</guid><author>runtulaoye</author><pubDate>Wed, 23 Jun 2021 16:39:14 +0800</pubDate><description><![CDATA[#对10个数进行排序
list = [2, 7, 1, 4, 5, 9, 6, 25, 15, 3]
print(list)
for i in range(10):
    for j in range(i + 1, 10):
        min = list[i]
        if list[j] &lt; min:
            temp = list[j]
            list[j] = list[i]
            list[i] = temp
print(l]]></description><category></category></item></channel></rss>