sj_dde

导航

 

2021年9月5日

摘要: 也许我真的有程序员天赋 # __author:"AMARA" # date:2021/9/5 14:30 s = int(input('your salary>>')) print(''' 1.iphone 12 6500元 2.switch 2200元 3.coffee 35元 4.book 60 阅读全文
posted @ 2021-09-05 18:35 sj_dde 阅读(99) 评论(0) 推荐(0)
 
摘要: For循环: idname = 'a' password = '1' i=0 for i in range (3): id1 = input('input your id name>>') pass1 = input('input your password>>') if id1 == idname 阅读全文
posted @ 2021-09-05 14:20 sj_dde 阅读(150) 评论(0) 推荐(0)
 
摘要: a=['a','b','c','d','e'] # 查找 # a.count #次数 # a.index #位置 # 'xxx' in a # 增加 # a.append() #追加 # a.insert(index,'xxx') #插入 # a.extend #扩展(2表合一) # 修改 # a[ 阅读全文
posted @ 2021-09-05 14:01 sj_dde 阅读(17) 评论(0) 推荐(0)
 

2021年8月24日

摘要: 输入行数,得到成数列递增的三角形 height = int(input("the height is>>")) num = 1 h = 1 while num <= height: h = num #让h永远等值num,与循环后的v无关 while h > 0: print("#",end="") 阅读全文
posted @ 2021-08-24 20:00 sj_dde 阅读(28) 评论(0) 推荐(0)
 

2021年8月11日

摘要: 输入的数做直角三角形 反三角形: height = int(input("the height is>>")) num = 1 while height>0: h = height while num <= h: print("#",end="") h -= 1 print() height -=1 阅读全文
posted @ 2021-08-11 22:01 sj_dde 阅读(57) 评论(0) 推荐(0)
 

2021年8月10日

摘要: 第一次靠自己的逻辑写出一段对现阶段的自己颇有挑战性的代码。 只是业余时间学习代码确实专注力不足。不知有生之年能否成为自己幻想中的那个人。 Q:试用#号输出一个长方形,用户可以指定宽和高,如果长为3,高为4,则输出一个横着有3个#号,竖着有4个#号的长方形 width = int(input("inp 阅读全文
posted @ 2021-08-10 22:01 sj_dde 阅读(31) 评论(0) 推荐(0)
 

2021年6月23日

摘要: 1.编码表:常用UTF-8、BGK 2.第一个代码:print("hello,world!") 3.if代码: number = 50 q = input("请输入你的猜测数字:") if q == 50: print("You get the answer!") elif q < 50: prin 阅读全文
posted @ 2021-06-23 21:05 sj_dde 阅读(36) 评论(0) 推荐(0)