python123第一周作业答案
@哈饼5335:Python使用for循环依次打开该目录下的各文件 -
佘颜19715892596…… import os path = r"F:\Python\第一周作业\task" otherpath=r"F:\Python\其它目录" for filename in os.listdir(path): print(path,filename) fullname=os.path.join(path,filename) if os.path.isfile(fullname): othername=os.path.join(otherpath,filename) ...
@哈饼5335:手机python123怎么进入? -
佘颜19715892596…… 首先你要有自己的账号,登bai录你的账号 然后进入“我的du课程”在找到一个加号“加zhidao入新课程”点击回,就可以看到了课程码,zhi,是你的dao老师给你的课程码,输入错误是进不去的,必须跟你的老师沟通内好 如果是跟“嵩天”老师在中国大学MOOC上进行学习,容那么答你就教程操作就可以了,
@哈饼5335:python怎样编程第一行输出1234556,第二行输出12345,第三行输出1234办得倒三角 -
佘颜19715892596…… 按照你的要求编写的Python程序如下 #!/usr/bin/python3 n=4 for i in range(1,n*2+1):for j in range(1,n+1-abs(n-i)):print (j, end='')print()
@哈饼5335:编程123反转python -
佘颜19715892596…… In [1]: a="123" In [2]: b=list(a) In [3]: b.reverse() In [4]: "".join(b) Out[4]: '321'
@哈饼5335:python中将123变为231的程序 -
佘颜19715892596…… 1 2 3 4 5 defmain(num): strNum =str(num) returnint(strNum[1:3]+strNum[0:1]) if__name__ =='__main__': printmain(123)
佘颜19715892596…… import os path = r"F:\Python\第一周作业\task" otherpath=r"F:\Python\其它目录" for filename in os.listdir(path): print(path,filename) fullname=os.path.join(path,filename) if os.path.isfile(fullname): othername=os.path.join(otherpath,filename) ...
@哈饼5335:手机python123怎么进入? -
佘颜19715892596…… 首先你要有自己的账号,登bai录你的账号 然后进入“我的du课程”在找到一个加号“加zhidao入新课程”点击回,就可以看到了课程码,zhi,是你的dao老师给你的课程码,输入错误是进不去的,必须跟你的老师沟通内好 如果是跟“嵩天”老师在中国大学MOOC上进行学习,容那么答你就教程操作就可以了,
@哈饼5335:python怎样编程第一行输出1234556,第二行输出12345,第三行输出1234办得倒三角 -
佘颜19715892596…… 按照你的要求编写的Python程序如下 #!/usr/bin/python3 n=4 for i in range(1,n*2+1):for j in range(1,n+1-abs(n-i)):print (j, end='')print()
@哈饼5335:编程123反转python -
佘颜19715892596…… In [1]: a="123" In [2]: b=list(a) In [3]: b.reverse() In [4]: "".join(b) Out[4]: '321'
@哈饼5335:python中将123变为231的程序 -
佘颜19715892596…… 1 2 3 4 5 defmain(num): strNum =str(num) returnint(strNum[1:3]+strNum[0:1]) if__name__ =='__main__': printmain(123)