自定义博客皮肤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)
  • 收藏
  • 关注

原创 初识函数(05)

1. Write a Python function to ask users to enter their password twice (Can be numbers, letters or special characters) , and return a boolean value to determine whether the two passwords are the same. 编写一个函数,該函數需要用戶輸入兩次密碼 (可以是任意位數的數字,字母或特殊字符),并返回判斷兩次密碼是否相同的

2021-09-27 15:59:58 207

原创 字典运用(04)

1. Create a dictionary to store information for 10 students as follows.2. Allow users to search for student info based on student ID. 允許用戶使用student ID查詢学生记录。3. Output all student info based on sorted student ID. 请根据学生学号从小到大输出所有学生的信息。import pprint .

2021-09-21 10:31:38 235

原创 字串符英文标点转空格(03)

Given a hotel review as"The location is great. Took advantage of the downtown location to walk to dinner, check out a couple galleries, and have drinks. It was great. I highly recommend this hotel for anyone visiting downtown. However, the condition of t

2021-09-21 10:27:03 526

原创 List 切片练习(02)

Solve your problems in Jupyter Notebook and submit the Jupyter notebook(.ipynb) file: D1-zhangsan-ass2.ipynb.1. 利用下面的phrase,使用切片的方法,生成一個new_phase,'Use it!'.phrase="Let's just do it!"phrase="Let's just do it!"a=list(phrase)Use_it=''.join(a[7:9])+

2021-09-21 10:20:52 288

原创 判断是否为回文字串符号(01)

defreverse(text):returntext[::-1]defisHuiWen(text):returntext.lower()==reverse(text).lower()text=input("输入一个字符串判断是否是回文字符串:\n")ifisHuiWen(text):print("该字符串是回文")else:print("该字符串不是回文")上文为方法一,在考虑文本大小写后改变的代码。下文为...

2021-09-19 15:43:47 160

空空如也

空空如也

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

TA关注的人

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