共有 9 篇文章
2024-08-10
Codewars
2024-08-10 ~ 2024-08-29
Data Structure Buffer Traffic light Description https://www.codewars.com/kata/58649884a1659ed6cb000072/ You’re writing code to control your town’s traffic lights. You need a function to handle each change from green, to yellow, to red, and then to green again. Complete the function that takes a string as an argument representing the current state of the light and returns a string representing the state the light should change to. For example, when the input is green, output should be yellow. def update_light(current): pass Solutions Ver
2024-06-11
Coding Practice: Stack
2024-06-11 ~ 2024-08-16
DSA
Case Study 来源:Lambert, K.A., 2018. Fundamentals Of Python: Data Structures, 2nd ed. Cengage Learning. 目标 该程序允许用户输入一个任意的后缀表达式,并显示表达式的值或错误消息(如果表达式无效)。其核心是展示栈的应用。
2024-04-16
Python 对象框架
2024-04-16 ~ 2024-08-27
想象你走进一家星巴克咖啡店。这里有许多不同种类的咖啡杯,每个咖啡杯都具有不同的特性。例如: 容量:有小杯(Tall)、中杯(Grande)、大杯(Venti)等。
2024-04-11
Python 中的异常处理
2024-04-11 ~ 2024-04-17
在我们的日常生活中,灵活应对突发状况是常态。比如说,在家炒菜时,火候的掌控至关重要。如果火太大,菜可能会糊;火太小,则菜可能生熟不均。为了避免这些情况,我们会经
2024-03-30
从编写到提交:使用Jupyter Notebook完成实验报告
2024-03-30 ~ 2024-05-29
Prerequisite 为了确保您能够成功地将 Jupyter Notebook 转换为符合格式要求的 PDF 文档,请按照以下推荐步骤进行设置和安装: 安装 $\LaTeX$ 编译环境: 在 Windows 上,建议安装 TeX Live。 在 MacOS 上,建议安装 MacTe
2024-03-22
《数据结构与算法》实验项目
2024-03-22 ~ 2024-04-12
DSA
注意: 请遵循"从编写到提交:使用Jupyter Notebook完成实验报告“中描述的实验报告格式要求 实验项目一:动态数组和链表比较 目标: 让
2024-03-21
Coding Practice:Arrays and Linked Structures
2024-03-21 ~ 2024-06-10
DSA
Exercise 1 在以下六个项目中,你需要修改本章中定义的 Array 类,使其更像 Python 的 list 类。对于每个解决方案,请包括修改后的 Array 类代码。 在 Array 类中添加一个实例变量 logical_size。
2024-02-22
Initializing a project with Poetry and VS Code editor
2024-02-22 ~ 2024-04-12
初始化项目使用到的工具如下: Poetry: 依赖管理 VS Code:代码编辑 Pytest:代码测试 Windows Terminal:执行相关命令,或者使用 VS Code 内嵌的 Terminal(在 VS Code 中按
2024-02-08
基于 pyenv-win 和 Poetry 构建 Python 开发环境
2024-02-08 ~ 2024-04-12
简介 构建和维护一个高效、可靠的 Python 开发环境是至关重要的。为了实现这一目标,开发者可以选择多种工具来搭建自己的开发环境,包括但不限于 virtualenv、venv、