- 博客(8)
- 收藏
- 关注
原创 【记录贴】IPP4. Use the data in the array’s objects to print ehe month with the most/ least rain
Month class class Month implements Comparable <Month>{ private String monthName; // Field for the Month's name private int amount; // Field for the amount of ra.
2021-04-20 16:58:10
140
原创 【记录贴】IPP3. Convert a Fahrenheit temperature to Celsius and Kelvin.
任务要求: Temperature Class (Temperature.java) • One field, a double, named fTemp. • One constructor that accepts one argument. o The constructor should assign the value of this argument to fTemp. • A method named toCelsius that returns the temperature (value
2021-03-27 21:25:43
152
原创 b站马士兵视频练习_第八站
目录 1.什么是元组 2.元组的创建方式 3.元组的遍历 4.什么是集合 5.集合的创建 6.集合的增删改操作 7.集合的生成 一、什么是元组 二、元组的创建方式 t = ('a','b',23) print(t) t2 = 'a','b',23 print(t2) t3 = tuple(('a','b',23)) print(t3) 运行结果 (‘a’, ‘b’, 23) (‘a’, ‘b’, 23) (‘a’, ‘b’, 23) 三、元组的遍历 两种获取元组的方式 t = ('a.
2021-03-07 09:33:40
354
3
原创 b站马士兵视频练习_第七站
目录: 字典及其原理 字典的创建 字典元素的获取 字典的常用操作 字典的生成式 一、字典及其原理 二、字典的创建 第一种创建 scores = {'a':23,'b':34,'c':65} print(scores) print(type(scores)) {‘a’: 23, ‘b’: 34, ‘c’: 65} <class ‘dict’> 第二种创建 student = dict(name = 'jack', age = 20) print(student) {‘nam
2021-03-04 20:21:00
229
3
原创 Python For Everyone Chapter6 Exercises
Exercise 5: Take the following Python code that stores a string: str = ‘X-DSPAM-Confidence:0.8475’ Use find and string slicing to extract the portion of the string after the colon character and then use the float function to convert the extracted string i.
2021-02-24 16:20:43
230
原创 b站马士兵python视频练习_第六站
1.列表的创建与删除 2.列表的查询操作 lst = ['hello','world',98,'hello'] print(lst.index('hello',1,3)) #不包括3,所以查找的是world和98. 以下是shell的运行结果 Traceback (most recent call last): File “/Users/cici/Downloads/乘法表.py”, line 25, in print(lst.index(‘hello’,1,3)) ValueErr
2021-02-19 20:00:58
225
原创 Python for Everyone 练习
#PY4E Chapter5 Exercises 练习题目如下 Exercise 1: Write a program which repeatedly reads numbers until the user enters “done” . Once “done” is entered, print out the total, count, and average of the numbers. If the user enters anything other than a number, dete
2021-02-19 16:11:05
679
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人