USYD info1100课业解析

leo英系代essay 2019-09-19 03:35:47
题意: 使用python编写一个账单管理系统 解析: 用Python编写应用程序,该程序能够记录用户的收入和支出,能够显示余额的变化,用户能够指定时间设定收入与支出。 程序需要从文件中读取信息当作起始条件,随后根据指令进行操作: trancaction:当用户输入该指令后,提示用户输入交易涉及多少钱,正数为收入,负数为支出,然后反应在余额中。 next:进入第二天。但如果用户余额低于0,则打印“你欠债了”,程序结束;否则,程序应该打印到第二天,开始新的一天。 status:显示到目前的情况汇总,而且回根据当前金额与起始金额与用户互动。 regular:用户能够指定一些常规的收入或者指出信息。 help:显示提示信息,提示用户指令的操作 quit:退出程序。 这是一个字符串处理的问题,当用户输出的字符串和指令相匹配则执行相应的操作,如果不是上述的所有指令则打印提示信息。 涉及知识点: 文件读写、字符串处理、数组 pdf全文 INFO1110 / COMP9001 Assignment 1 Money Tracker Deadline: 23rd Sept 2019, 11:59pm AEST (Week 8, Monday) Weighting: 10% of the final assessment mark Overview Brief Description You will write a program that allows the user to manage their finances. The program will be able to record the user’s incomes and expenses, display how their balance has changed, etc. It will also need to be able to handle regular incomes and expenses; for example, the user will be able to specify that they have a $100 income every Sunday, or that they spend $40.50 every Thursday. Implementation details Your program will be written in Python 3. The only modules you may import are sys and the function.py file which you will write yourself. Submission You will submit your code on the assignment page on Ed. To make a submission, you will need to press the “Mark” button. You may submit as many times as you wish without penalty - we will mark the last submission that you make. After each submission, the marking system will automatically check your code against the public test cases. Please ensure you carefully follow the assignment specification. Your program output must exactly match the output shown in the examples. Warning: Any attempts to deceive or disrupt the marking system will result in an immediate zero for the entire assignment. Negative marks can be assigned if you do not properly follow the assignment specifications, or your code is unnecessarily or deliberately obfuscated. Help and feedback You are encouraged to ask questions about the assignment during the Helpdesk and on the Ed discussion board; however, remember that you should not be posting any assignment code publicly, as this would constitute academic dishonesty. The Program Starting the Program The program will be given 1 extra command line argument when it is run: $ python3 tracker.py (filename) This (filename)will specify a file with information about regular incomes and expenses; see the section on Regular Transactions for more information (it is recommended that you implement this feature last). After handling this file, the program will ask the user for their starting balance, like so: Starting balance: $ The user will then fill out this field with their initial balance, for example: Starting balance: $4.11 —If the starting value cannot be converted to a float, the program should print Error: Cannot convert to float! and quit immediately Starting balance: $cat Error: Cannot convert to float! —If the starting value is negative or zero, the program should print Error: Must start with positive balance! and quit immediately. Starting balance: $-5 Error: Must start with positive balance! Once we have the regular payments and initial balance set up, we’re good to go! The program should now continually ask for input, like so: Enter command: Depending on what the user enters, the program will record new transactions, show some statistics, etc. For example, if the user types transaction … Enter command: transaction …then the transaction operation (explained below) should execute. The program should continue asking for more inputs indefinitely, and execute the appropriate code each time. Operations
...全文
139 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
本数据集来源于 2024 年 7 月在江西省中东部余干县、贵溪市、金溪县丘陵林地采集的千枚岩、红砂岩、花岗岩母质发育红壤关键带剖面土壤实测数据,空间覆盖 3 个县域不同岩性风化壳林地,采样点位经纬度分别为千枚岩剖面 P10(116.8316°E,28.5269°N)、红砂岩剖面 P08(117.1048°E,28.3492°N)、花岗岩剖面 P04(116.6883°E,27.9963°N);垂直空间采样深度存在差异,千枚岩与花岗岩剖面采样深度 0~600 cm,红砂岩剖面采样深度 0~450 cm,垂直分层采样分辨率为 0~50 cm 区间分 0~20 cm、20~50 cm 两层,50 cm 以下土层以 50 cm 为固定间隔分层,整套数据集共包含 36 条土壤剖面分层记录,其中 P10 千枚岩剖面 13 条、P08 红砂岩剖面 11 条、P04 花岗岩剖面 13 条。数据采集时间为 2024 年 7 月,实验室理化指标、矿物测试、酸碱滴定及统计建模工作于 2024 年 7 月 —2026 年 5 月完成,无时间序列连续监测数据,仅为单次野外剖面采样静态数据集。 数据集包含野外剖面基础信息、土壤酸碱滴定原始数据、土壤酸度指标、交换性盐基与交换性酸、土壤机械组成、有机质、黏土与原生矿物半定量 XRD 数据、无定形 / 晶形铁铝氧化物含量。全量理化指标计量单位统一规范:酸缓冲容量 pHBC 单位为 cmol・kg⁻¹・pH⁻¹,交换性酸、交换性盐基离子单位为 cmol・kg⁻¹,矿物以质量百分比(%)表示,、黏粒 / 粉粒 / 砂粒、有机质、铁铝氧化物单位均为g/kg,pH 为无量纲数值。 覆盖范围: 中位纬度: 28.2616 中位经度: 116.89654999999999 南界纬度: 27.9963 西界经度: 116.6883 北界纬度: 28.5269 东界经
内容概要:本文系统阐述了一种基于高热点算法的数据驱动与多离散场景分布鲁棒优化方法,聚焦于电热综合能源系统的协同优化问题。研究融合双层鲸鱼优化算法、非合作博弈理论与居民负荷分层调度模型,构建了兼顾不确定性与多方利益博弈的复杂系统优化框架,并通过Matlab代码实现了完整的建模、求解与仿真流程,充分体现了数据驱动与鲁棒优化在现代综合能源系统中的应用价值。; 适合人群:具备电力系统分析、优化算法及Matlab编程基础的科研人员与高校研究生,尤其适用于从事能源互联网、综合能源系统调度、鲁棒优化与智能算法应用等相关领域研究的专业人士。; 使用场景及目标:①实现电热综合能源系统的多能协同与优化调度;②应对源荷不确定性下的多场景鲁棒决策问题;③设计基于博弈机制的负荷侧资源分层调控策略;④为高水平学术论文复现、科研项目开发及算法验证提供可运行、可扩展的Matlab代码支持。; 阅读建议:建议结合网盘提供的完整代码与案例数据,按照技术路线逐步学习,重点关注双层优化结构的设计逻辑、非合作博弈的数学建模方式以及鲸鱼算法在多场景鲁棒优化中的实现细节,通过调试与修改代码深化对核心算法与系统模型的理解,提升科研实践与创新能力。

259

社区成员

发帖
与我相关
我的任务
社区描述
其他产品/厂家
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧