当前位置:首页 >> 编程语言 >> 【Python CheckiO 题解】I Love Python!,索爱r306

【Python CheckiO 题解】I Love Python!,索爱r306

0evadmin 编程语言 1
文件名:【Python CheckiO 题解】I Love Python!,索爱r306 【Python CheckiO 题解】I Love Python!

CheckiO 是面向初学者和高级程序员的编码游戏,使用 Python 和 JavaScript 解决棘手的挑战和有趣的任务,从而提高你的编码技能,本博客主要记录自己用 Python 在闯关时的做题思路和实现代码,同时也学习学习其他大神写的代码。

CheckiO 官网:https://checkio.org/

我的 CheckiO 主页:https://py.checkio.org/user/TRHX/

CheckiO 题解系列专栏:https://itrhx.blog.csdn.net/category_9536424.html

CheckiO 所有题解源代码:https://github.com/TRHX/Python-CheckiO-Exercise


题目描述

【I Love Python!】:练习函数的调用,定义一个函数,返回字符串“I Love Python!”

【链接】:https://py.checkio.org/mission/i-love-python/

【输入】:Nothing

【输出】:字符串

【范例】:

i_love_python() == "I love Python!" 代码实现 def i_love_python():"""Let's explain why do we love Python."""return "I love Python!"if __name__ == '__main__':# These "asserts" using only for self-checking and not necessary for auto-testingassert i_love_python() == "I love Python!" 大神解答

看看各个国家的语言

# Select your language in which you want to say "I Love Python!"# By default it answers in english.def i_love_python(language="English"): if language == "Binary": return "01000010011001010010000001110011011101010111001001100101001000000111010001101111001000000110010001110010011010010110111001101011001000000111100101101111011101010111001000100000010011110111011001100001011011000111010001101001011011100110010100101110"if language == "Deutsch": return "Ich liebe Python!"if language == "English": return "I love Python!"if language == "Español": return "Me Encanta Python!"if language == "Espéranto": return "Αγαπώ Python!"if language == "Elf": return "Amin mela Python!"if language == "Ελληνική": return "Αγαπώ Python!"if language == "Français": return "J'aime Python !"if language == "Italiano": return"Adoro Python!"if language == "русский": return "Я люблю Python !"if language == "L337 Speak": return "1 L0\/3 p'/7|-|0|\|!"if language == "코리안": return "나는 파이썬 Python!"if language == "中國": return "我愛Python的 !"if language == "日本の": return "私はPythonのが大好き !"if language == "हिन्दी": return "मैं अजगर प्यार!"
协助本站SEO优化一下,谢谢!
关键词不能为空
同类推荐
«    2025年12月    »
1234567
891011121314
15161718192021
22232425262728
293031
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言
文章归档
网站收藏
友情链接