自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 4

class Dog(object):def init(self,name,age):self.name=nameself.age=agedef sit(self):print(self.name.title()+“is now sitting.”)def roll_over(self):print(self.name.title()+“rolled over!”)my_dog=Dog(‘whillie’,6)print(“My dog’s name is “+my_dog.name.tit

2021-05-24 21:40:29 53

原创 2021-04-05

#第四章(循环遍历)‘’‘magicians=[‘alice’,‘david’,‘carolina’]for magician in magicians: #将magicians中的元素存入变量magician中,然后输出print(magician)print(magician.title()+",that was a great trick!")print(“I can’t wait to see your next trick,”+magician.title()+".\n"

2021-04-05 21:44:33 179

原创 2021-03-27

‘’’bicycles=[‘trek’,‘cannondale’,‘redline’,‘specialized’]print(bicycles[0])print(bicycles[0].title())print(bicycles[-1]) #输出-1位置的元素(位置可变)message=“My first bicycle was a “+bicycles[0].upper()+”.”print(message)‘’’motorcycles=[‘honha’,

2021-03-27 00:41:03 104

原创 2021-03-21

alist=[3,5,7]blist=alist[:]alist==blisttruealist is blistfalseblist

2021-03-21 16:49:57 74

原创 python第一周

h=eval(input(“input height:”))print(type(h))w=eval(input(“input width:”))s=h*wprint(s)eval()print(“4+5/6”)print(12%5)print(“圆周率为%.2f%3.1415926”)#format()print(“my name is {1},my age is {0}”.format(18,“tom”))print(f"my name is {‘tom’},my age is {

2021-03-14 15:58:17 51

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除