调用time模块,小数点后不是微秒吗,为什么视频里面讲的是0.69秒呢?
为什么画不出来,自己反反复复查了好几遍,还是看不出哪里错了,请老师指教
老师,箭头可以收吗?怎样才能和图片一模一样。
老师为什么传递不可变对象时 并没有进行复制啊 m和a都指向了同一个对象 并没有进行复制啊
#用函数写代码的话更是出现问题,麻烦问一下老师,是什么原因?多谢了!
def salary(monthly_salary):
if monthly_salary:
hao = int(monthly_salary)*12
return hao
if monthly_salary == 't':
return '退出!'
prompt = "Please enter your monthly salary,quit press 'quit': "
print(salary(88))
#字符串中的作业,已经月薪,输出年薪,这样写代码没有问题
while True:
monthly_salary = input("Please enter your monthly salary,quit press 'q': ")
if monthly_salary == 'q':
break
else:
print(int(monthly_salary)*12)
#但这样写代码出现问题了,一点字符串'q'就出现问题,麻烦问一下老师,到底是什么原因
if monthly_salary !='q':
def test01(): print("jhy") c=print(test01()) #输出函数的返回值 无返回值则输出None print(test01) #与print(id(test01))是一样的 一个是十进制 一个是十六进制 print(id(test01)) #栈中test01这个变量存放的地址 print(id(test01())) #函数返回值的id 也就是None的地址
老师这样理解对吗
(): () c=(test01()) (test01) ((test01)) ((test01()))
麻烦问一下老师,这个反斜杠为啥在键盘上打不出来?
为什么会存在这样的区别,转义字符后面跟字母有什么用
>>>b ='i\'m a student'
>>>b
"i'm a student"
为什么下面会是双引号
>>>b ='i am "xiaoming"'
'i am "xiaoming"'
这里却是原样展示
老师,Python解释器咋知道名字为3的对象和名字为“我爱你”的对象,它们的id就是这个?(๑• . •๑)
#绘制奥运五环
import turtle
turtle.width(10)
turtle.color("blue")
turtle.cricle(50)
turtle.penup()
turtle.goto(120,0)
turtle.pendown()
turtle.color("black")
turtle.goto(240,0)
turtle.color("red")
turtle.goto(60,-50)
turtle.color("relllow")
turtle.goto(180,-50)
turtle.color("green")
turtle.circle(50)
代码运行出错
设置宽度为10会对半径为50存在影响吗,是将圆向外扩张吗
#导入海龟绘图模块
turtle.showturtle()
turtle.write("张翔")
turtle.forward(300)
tuetle.left(90)
turtle.goto(0,50)
turtle.goto(0,0)
turtle.goto(0,300)
turtle.goto(50,50)
turtle.circle(100)
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637