自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 CheckIO题目整合

这里是引用这篇主要是整合目前已经解决的CheckIO里的题目岛屿题目知识点题解链接HomeSum Numbers字符串与列表转换;判断数据类型题解HomeEven the Last列表切片、索引题解HomeRight to Left字符串替代和组合题解...

2020-12-15 13:23:58 1853 1

原创 O‘REILLY: Lightbulb More —— 考虑灯泡工作时长的多灯泡照亮房间下计算指定时间范围内多组时间差之和(秒数)

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/lightbulb-more/背景这部分是关于灯泡的一系列任务,有助于了解流程以及对流程效果的评估。 在现实生活中,除了灯泡,也需要计算其他设备的效果,或者上班.

2021-03-30 12:24:28 239 1

原创 O‘REILLY: Parse Array —— 找bug(flatten列表)

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/parse-array/题目这一任务给出了题解,但是里面有bug,需要找出并修改。其中,"import", "exec" 和 "eval" 不可用。给定一个包.

2021-03-29 20:00:00 208

原创 O‘REILLY: Time Converter —— 12小时制转24小时制

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/time-converter-12h-to-24h/题目作为现代人,我们更习惯24小时制,但是一些情况下依然会使用12小时制。这一任务是要将12小时制转换为24.

2021-03-21 16:57:02 453 1

原创 O‘REILLY: Lightbulb Operating —— 考虑灯泡工作时长的多灯泡下计算指定时间范围内多组时间差之和(秒数)

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/lightbulb-operating/背景这部分是关于灯泡的一系列任务,有助于了解流程以及对流程效果的评估。 在现实生活中,除了灯泡,也需要计算其他设备的效果.

2021-03-21 16:45:17 210 1

原创 O‘REILLY: Multiple Lightbulbs —— 多灯泡下计算指定时间范围内多组时间差之和(秒数)

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/multiple-lightbulbs/背景这部分是关于灯泡的一系列任务,有助于了解流程以及对流程效果的评估。 在现实生活中,除了灯泡,也需要计算其他设备的效果.

2021-03-17 21:37:38 238

原创 O‘REILLY: Lightbulb End Watching —— 计算指定时间范围内多组时间差之和(秒数)

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/lightbulb-end-watching/背景这部分是关于灯泡的一系列任务,有助于了解流程以及对流程效果的评估。 在现实生活中,除了灯泡,也需要计算其他设备.

2021-03-16 15:45:53 338 4

原创 O‘REILLY: Lightbulb Start Watching —— 从指定时间开始计算多组时间差之和(秒数)

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/lightbulb-start-watching/背景这部分是关于灯泡的一系列任务,有助于了解流程以及对流程效果的评估。 在现实生活中,除了灯泡,也需要计算其他.

2021-03-09 13:12:33 462 2

原创 O‘REILLY: Lightbulb Intro —— 计算多组时间差之和(秒数)

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/lightbulb-intro/背景这部分是关于灯泡的一系列任务,有助于了解流程以及对流程效果的评估。 在现实生活中,除了灯泡,也需要计算其他设备的效果,或者上.

2021-03-09 12:58:46 163 2

原创 HOME: Bigger Price —— 对字典组成的列表进行排序

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/bigger-price/题目用字典表示的表格中有商店里所有可购买商品的信息,任务是找到其中最贵的前几个商品。要寻找的最贵的商品数量为第一个参数,商品信息为第.

2021-01-11 18:43:07 184

原创 HOME: Backward Each Word —— 反转单词

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/backward-each-word/题目给定一个字符串,反转单词(注意:单词的顺序不变输入: 字符串输出: 字符串举个栗子:backward_st.

2020-12-18 18:20:16 398 1

原创 HOME: Count Digits —— 计算字符串中数字个数

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/count-digits/题目计算字符串中数字的个数。输入: 字符串输出: 整数举个栗子:count_digits('hi') == 0count.

2020-12-18 16:51:40 821 1

原创 HOME: Days Between —— 计算天数差

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/days-diff/题目以天数计算你现在多大了?计算起来很容易:用今天起减去你的生日。不过,现在可以让这成为一个真正的挑战:计算出任何日期之间的天数差。以数组.

2020-12-16 11:41:35 1596 1

原创 HOME: First Word —— 字符串分割、正则表达式

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/first-word/题目给定一个字符串,找到其第一个单词。注意以下几点:字符串中可以包含点和逗号字符串可以以字母或点或空格开头一个单词可以包含一个撇.

2020-12-16 11:15:30 431

原创 HOME: Three Words —— 判断连续元素的数据类型

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/three-words/题目给定一个字符串,该字符串由空格(一个空格)分隔单词和数字,这些单词部分只包含字母。检查字符串是否连续包含三个单词。例如,字符串“St.

2020-12-16 10:21:47 245

原创 HOME: Right to Left —— 字符串替代和组合

CheckIO是一个通过闯关游戏学习编程的网站(Python和JavaScript)。通过解题开发新“岛屿”,同时,通过做任务获得Quest Points解锁会员题目。文章内容:题目、我自己的思路和代码以及优秀代码,如果想看大神解题可以直接跳到“优秀代码”部分。本题链接:https://py.checkio.org/en/mission/right-to-left/题目将多个字符串中的“right”改为“left”,并组合成一个字符串输入: 字符串序列组成的元组输出: 以逗号分隔的字符串.

2020-12-15 13:18:14 242

原创 HOME: Even the Last —— 列表索引

题目给定一个整数列表,把偶数索引位置的元素相加(0,2,4 …),然后把相加后得到的数与最后一个元素相乘。(友情提醒:列表中第一个元素的索引是0)如果传入的是一个空列表,则应该返回0。输入: 一个整数列表输出: 你得出的答案(整数值类型)举个栗子:checkio([0, 1, 2, 3, 4, 5]) == 30checkio([1, 3, 5]) == 30checkio([6]) == 36checkio([]) == 0应用场景:索引和切片是Python和其他语言编码的重要元素

2020-12-15 12:26:18 149

原创 HOME: Sum Numbers ——对字符串中的独立数字求和

题目在给定的文本中,对数字进行求和,只计算单独的数字。如果一个数字是一个单词的一部分,就不计算在内。文本中只包含字母、空格和数字。输入:字符串输出:整数例子:sum_numbers('hi') == 0sum_numbers('who is 1st here') == 0sum_numbers('my numbers is 2') == 2sum_numbers('This picture is an oil on canvas ' 'painting by Danish artist

2020-12-14 22:08:22 904

原创 O‘REILLY: The Flat Dictionary ——嵌套字典降为一维

题目Python dictionaries are a convenient data type to store and process configurations. They allow you to store data by keys to create nested structures. You are given a dictionary where the keys are strings and the values are strings or dictionaries. The g

2020-09-27 11:32:23 206

原创 O‘REILLY: Flatten a List —— 嵌套列表降为一维

题目难度: Simple+题目框架def flat_list(array): return arrayif __name__ == '__main__': assert flat_list([1, 2, 3]) == [1, 2, 3], "First" assert flat_list([1, [2, 2, 2], 4]) == [1, 2, 2, 2, 4], "Second" assert flat_list([[[2]], [4, [5, 6, [6], 6

2020-09-22 10:18:37 189

原创 O‘REILLY: Median of Three —— 列表中每3个元素的中位数组成新列表

题目Given an iterable of ints , create and return a new iterable whose first two elements are the same as in items, after which each element equals the median of the three elements in the original list ending in that position.Wait…You don’t know what the “

2020-09-21 10:02:33 390

原创 O‘REILLY: How Deep —— 计算元组深度

题目You are given a tuple that consists of integers and other tuples, which in turn can also contain tuples.Your task is to find out how deep this structure is or how deep the nesting of these tuples is.For example, in the (1, 2, 3) tuple the depth of nes

2020-09-17 10:05:07 265

原创 O‘REILLY: Compress List —— 列表中删除相邻相等元素

题目A given list should be “compressed” in a way so, instead of two (or more) equal elements, staying one after another, there is only one in the result Iterable (list, tuple, iterator …).Input: List.Output: “Compressed” Iterable (list, tuple, iterator …

2020-09-16 17:13:50 342

原创 O‘REILLY: Reverse Every Ascending —— 将列表中的升序改为降序

题目Create and return a new iterable that contains the same elements as the argument iterable items, but with the reversed order of the elements inside every maximal strictly ascending sublist. This function should not modify the contents of the original it

2020-09-15 21:41:34 324

原创 O‘REILLY: Frequency Sorting —— 根据列表中元素个数排序

题目Your mission is to sort the list by the frequency of numbers included in it. If a few numbers have an equal frequency - they should be sorted according to their natural order. For example: [5, 2, 4, 1, 1, 1, 3] ==> [1, 1, 1, 2, 3, 4, 5]Input: Chaoti

2020-09-14 17:55:15 199

原创 O‘REILLY: Sort Except Zero —— 列表中非0元素排序

题目Sort the numbers in an array. But the position of zeros should not be changed.Input: A List.Output: An Iterable (tuple, list, iterator …).Example:except_zero([5, 3, 0, 0, 4, 1, 4, 0, 7]) == [1, 3, 0, 0, 4, 4, 5, 0, 7]except_zero([0, 2, 3, 1, 0, 4,

2020-09-13 15:59:54 300

原创 O‘REILLY: Chunk —— 分割列表

题目Split a list into smaller lists of the same size (chunks). The last chunk can be smaller than the default chunk-size. If the list is empty, then you shouldn’t have any chunks at all.Input: Two arguments. A List and chunk size.Output: An Iterable with

2020-09-11 17:13:51 134

原创 leetcode刷题 (数据库 MySQL) Part 2

LEETCODE数据库题目刷题,一般题目都会整理(目前只有非会员的题目 ????),除了自己的题解还会整合大家的,不定期更新(暂时决定10道题左右一个文档,要不然太长了,最后看能刷多少题再看要不要整合吧)。LEETCODE数据库题库链接:https://leetcode-cn.com/problemset/database/197.上升的温度题目: 给定一个 Weather 表,编写一个 SQL 查询,来查找与之前(昨天的)日期相比温度更高的所有日期的 Id。Id(INT)RecordD

2020-09-03 22:01:22 460

原创 CSDN写文章可用 Emoji 表情

...

2020-09-03 10:37:54 408

原创 O‘REILLY: Median —— 中位数

A median is a numerical value separating the upper half of a sorted array of numbers from the lower half. In a list where there are an odd number of entities, the median is the number found in the middle of the array. If the array contains an even number o

2020-09-02 18:03:09 186

原创 O‘REILLY: Remove All After —— 列表与给定元素匹配

题目Not all of the elements are important. What you need to do here is to remove all of the elements after the given one from list.For illustration, we have an list [1, 2, 3, 4, 5] and we need to remove all the elements that go after 3 - which is 4 and 5.

2020-09-02 16:23:23 152

原创 leetcode刷题 (数据库 MySQL) Part 1

LEETCODE数据库题目刷题,一般题目都会整理(目前只有非会员的题目 :|),会整合大家的题解,不定期更新(暂时决定10道题左右一个文档,要不然太长了,最后看能刷多少题再看要不要整合吧)。LEETCODE题库链接:https://leetcode-cn.com/problemset/all/

2020-09-01 14:57:19 1392

原创 O‘REILLY: Replace Last —— 列表元素左移

题目In a given list the last element should become the first one. An empty list or list with only one element should stay the sameInput: List.Output: Iterable.Example:replace_last([2, 3, 4, 1]) == [1, 2, 3, 4]replace_last([1]) == [1]难度: Elementary思

2020-08-28 13:28:44 155

原创 O‘REILLY: Xs and Os Referee —— 井字棋结果判断

题目Tic-Tac-Toe, sometimes also known as Xs and Os, is a game for two players (X and O) who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal rows (NW-SE and NE-SW)

2020-08-28 09:22:54 535

原创 O‘REILLY: Majority —— 比较列表中布尔值个数的多少

CheckIO简介:Coding games for beginners and advanced programmers where you can improve your coding skills by solving engaging challenges and fun task using Python and TypeScript

2020-08-25 17:24:57 228

原创 O‘REILLY: Index Power —— 列表和索引

题目You are given an array with positive numbers and a number N. You should find the N-th power of the element in the array with the index N. If N is outside of the array, then return -1. Don’t forget that the first element has the index 0.Let’s look at a

2020-08-25 13:35:00 153

原创 HOME: Morse Decoder —— 摩斯密码、正则表达式

题目Your task is to decrypt the secret message using the Morse code.The message will consist of words with 3 spaces between them and 1 space between each letter of each word.If the decrypted text starts with a letter then you’ll have to print this letter

2020-08-02 12:14:40 775

原创 HOME: Date and Time Converter —— 时间元组与时间字符串

题目Computer date and time format consists only of numbers, for example: 21.05.2018 16:30Humans prefer to see something like this: 21 May 2018 year, 16 hours 30 minutesYour task is simple - convert the input date and time from computer format into a “huma

2020-08-02 11:13:53 277

原创 HOME: All the Same —— 判断列表元素是否相等

题目In this mission you should check if all elements in the given list are equal.Input: List.Output: Bool.Example:all_the_same([1, 1, 1]) == Trueall_the_same([1, 2, 1]) == Falseall_the_same(['a', 'a', 'a']) == Trueall_the_same([]) == TrueThe idea f

2020-07-26 22:20:00 376

原创 HOME: Split List —— 分割列表(分奇偶不同情况)

题目You have to split a given array into two arrays. If it has an odd amount of elements, then the first array should have more elements. If it has no elements, then two empty arrays should be returned.Input: Array.Output: Array or two arrays.Example:s

2020-07-25 23:16:13 1196

空空如也

空空如也

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

TA关注的人

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