
Album
米Teen唔鐘意玩現成品,喜歡由零件開始砌。99次失敗唔係問題,最緊要係有1次成功!
米Teen總部設在聖公會白約翰會督中學506室,在午膳後和放學後集會。有興趣參與的同學,請與會長或導師聯絡。
2025-10-10 18:49:23
溫度31℃ 濕度82% 氣壓1011.11hPa
2025-10-10 08:22:10
閃電31km (0)
2025-10-05 15:05:32
閃電31km (0)
2025-10-05 14:26:16
閃電20km (0)
2025-10-05 14:26:15
閃電20km (0)
2025-10-05 14:15:43
閃電20km (0)
2025-10-05 11:07:55
閃電17km (1)
2025-10-05 09:00:45
閃電12km (1)
2025-10-05 08:57:24
閃電10km (1)
2025-10-05 08:49:54
閃電10km (1)
2025-10-05 08:47:32
閃電10km (2)
溫度31℃ 濕度82% 氣壓1011.11hPa
2025-10-10 08:22:10
閃電31km (0)
2025-10-05 15:05:32
閃電31km (0)
2025-10-05 14:26:16
閃電20km (0)
2025-10-05 14:26:15
閃電20km (0)
2025-10-05 14:15:43
閃電20km (0)
2025-10-05 11:07:55
閃電17km (1)
2025-10-05 09:00:45
閃電12km (1)
2025-10-05 08:57:24
閃電10km (1)
2025-10-05 08:49:54
閃電10km (1)
2025-10-05 08:47:32
閃電10km (2)
Find all local maxima.
Find all l...
> > >Find all the local maxima in a series.
1 | # Author: HUANG KWUN HOI (SKHBBSS, class 4D) |
2 | # Last modified: 2020.9.5 |
3 | file=open(r'p00300data.txt', 'r') # Put the data file here! |
4 | local_maximas=[] |
5 | list1=[] |
6 | previous_datum=0 |
7 | current_datum=0 |
8 | next_datum=0 |
9 | for data in file: |
10 | list1.append(int(data)) |
11 | next_datum=int(data) |
12 | if current_datum>previous_datum and current_datum>next_datum: |
13 | local_maximas.append(current_datum) |
14 | previous_datum=current_datum |
15 | current_datum=next_datum |
16 | file.close() |
17 | last_data=list1[-1] |
18 | second_last_data=list1[-2] |
19 | if last_data>second_last_data: |
20 | local_maximas.append(last_data) |
21 | print('local maximas: ', local_maximas) |

Album
米Teen唔鐘意玩現成品,喜歡由零件開始砌。99次失敗唔係問題,最緊要係有1次成功!
米Teen總部設在聖公會白約翰會督中學506室,在午膳後和放學後集會。有興趣參與的同學,請與會長或導師聯絡。
2025-10-10 18:49:23
溫度31℃ 濕度82% 氣壓1011.11hPa
2025-10-10 08:22:10
閃電31km (0)
2025-10-05 15:05:32
閃電31km (0)
2025-10-05 14:26:16
閃電20km (0)
2025-10-05 14:26:15
閃電20km (0)
2025-10-05 14:15:43
閃電20km (0)
2025-10-05 11:07:55
閃電17km (1)
2025-10-05 09:00:45
閃電12km (1)
2025-10-05 08:57:24
閃電10km (1)
2025-10-05 08:49:54
閃電10km (1)
2025-10-05 08:47:32
閃電10km (2)
溫度31℃ 濕度82% 氣壓1011.11hPa
2025-10-10 08:22:10
閃電31km (0)
2025-10-05 15:05:32
閃電31km (0)
2025-10-05 14:26:16
閃電20km (0)
2025-10-05 14:26:15
閃電20km (0)
2025-10-05 14:15:43
閃電20km (0)
2025-10-05 11:07:55
閃電17km (1)
2025-10-05 09:00:45
閃電12km (1)
2025-10-05 08:57:24
閃電10km (1)
2025-10-05 08:49:54
閃電10km (1)
2025-10-05 08:47:32
閃電10km (2)