DS2000 Problem 1 Every Vote Counts

【信息科学与工程学】计算机科学与技术——第七十七篇 系统架构设计02 编号类型模型配方企业资本运作的方法/规则/条件/依据及所有的步骤(​风险处理/异常处理/危机应对关联知识法律法规和裁决依据​​由发起人(通常是知名投资人、投行或产业资本)先设立一个只有现金、无实际业务的特殊目的收购公司(SPAC),通过IPO募集资金并在交易所上市。然后在规定时间内(通常24个月)寻找一家非上市公司进行合并(De-SPAC),使目标公司迅速实现上市,规避传统IPO的复杂流程和不确定性。1.:在开曼或特拉华注册空壳公司,注入少量种子资金。2. 阅读详情

DS2000

Fall 2024

Homework 1

Assigned: September 13, 2024

Deadline: September 20, 2024 at 9pm eastern

Submit each program as a .py file in gradescope (filenames are specified below). You may submit multiple times right up until the deadline.

You may submit up to 48 hours late for no penalty. This policy exists for those times you're having a tough week, are feeling sick, or are falling behind in your work; we won't make any exceptions to this policy.

You will have an opportunity at the end of the semester to submit one of homeworks 1-5 for a new grade. Your solution will be graded according to the DS2000 general rubric and style. guide.

You may not use conditionals or loops on this homework. The entire assignment can be accomplished with material we’ve covered in lecture.

Style. Guide Focus

(pay attention to these items in particular for this Homework, but the entire style guide will be used during grading, so please make sure you review it!)

● def main is used to organize code

● Constants are used for non-changing values; they are named in all caps and initialized above main

● Numerical values are not rounded during computation; they are rounded only for the user’s sake

The 30-minute Guideline

If you get stuck on a homework problem, come by office hours, post on Piazza, or take a break! We

recommend you spend about 30 minutes trying to figure out a problem -- enough time that you can try a few things to get unstuck, but not SO much time that you’re banging your head against the wall. Try for 30 minutes, then take a break, take a walk, and/or ask us. :)

Review the Autograder Output

When you submit your solution, gradescope will run your code and print out the results so you can see   what we’ll see when grading. Look at this output! It serves as a sanity-check to make sure your code    produces what you wanted; if it doesn’t, you can make revisions and resubmit up until the deadline. See the Gradescope FAQ to troubleshoot.

It’s fine to work with friends and share ideas with each other; it is not fine to share code. Do not show your code to classmates or post code on piazza.

Problem 1 - Every Vote Counts

Filename: elections.py

Prompt the user for, in this order:

● A U.S. state (a string).

●   How many people in this state voted in the November 2020 election? (This value should be an int and should not be abbreviated to thousands; find examples here.)

●   What percentage of the voting population does that represent? (This value should be a float in the range 0-100; find examples here.)

Using this information, compute and report the answers to the following questions. Round to a reasonable number of decimal places when reporting your results.

● How many people were eligible to vote in this state in 2020?

● How many people who were eligible to vote in 2020 did not?

●   It is hard to predict voter turnout in the coming election, but let’s say it decreases. If the number of 2020 voters in this state decreases by 3.2%, how many people will vote in this state in 2024?

●   There are 21,033 undergraduate students at Northeastern. If they all vote in this state in 2024, what percent of the vote would they collectively contribute?

For full credit under documentation, write a test case in a comment at the top ofyour file, something like this but with your own examples. Do this before you start coding so you know your program works! It's  okay if the format ofyour test case is different from your program's output.

Here’s an example of what happens when I run my program. (Your output doesn’t need to look exactly the same, but DO make sure your prompts are in the same order so that the autograder works):

Problem 2 - Olympic Year Filename: olympics.py

American runners Gabby Thomas (she/her), Nikki Hiltz (they/them), and Cole Hocker (he/him) all put on a great showing at the 2024 Olympic Games. Let’s figure out how fast they really are. :)

Prompt the user for, in this order:

● The name of an athlete (string).

● The distance of their race, in meters (int).

● Their time in the race, given in total seconds (float).

Using this information, compute and report the answers to the following questions:

● How many laps of the track was their race? (There are 400 meters per lap.)

● How many minutes and seconds was their race (note that minutes might be zero!)?

● What was their pace per lap, in minutes and seconds?

● What was their pace per mile, in minutes and seconds? (There are 1609 meters in a mile.)

For full credit under documentation, write two test cases in a comment at the top ofyour file, something  like this but with your own examples. Do this before you start coding so you know your program works!

Here’s an example of what happens when we run our program (yours doesn’t need to be exactly the same, but DO keep the prompts in the same order for the autograder):

Problem 3 - That Brand Life

Filename (code): influencer.py

Filenames (plot): influencer.png

Profs. Felix and Laney have decided to leave academia behind and become influencers on social media, under the brand FnL. They’ll be huge. In September 2024, FnL has 100 followers, but we expect a huge increase almost immediately. We assume that 5% of followers view any given post, 2.7% like it, and .97% comment on it.

The user for your Python program is a brand. Prompt the user for, in this order (all floats):

● How much will you pay per-view, for one post?

● How much will you pay per-like, for one post?

● How much will you pay per-comment, for one post?

Use the above information to compute (no need to print, except for testing!):

● How much money will one post generate for FnL, assuming we have 100 followers?

● How much money does one post generate, per follower?

● How many followers does FnL need to have to make $1,000 per post?

Create a scatterplot using plt.plot() where number of followers is on the x axis and per-post income is on the y axis. Your plot should have 4 separate points:

● Current per-post income for our starting point, September 2024 with 100 followers.

● Per-post income for October 2024, when our followers increase by 250%

● Per-post income for November 2024, when our followers increase by another 300%

● Per-post income when we reach our goal of $1,000 per post.

Save your plot as a .png file; do not submit screenshots. Make sure you review the style guide for the specific requirements that apply to all your plots in DS2000!

For full credit under the documentation category, write a test case in a comment at the top ofyour file,  like this but your own info. Do this before you start coding -- that way you know your program works!

「文智助手」全场景办公AI助理AI+OPC全流程实践方案(大赛作品) 阅读详情

相关推荐

船载 OpenHarmony AIS 航海工作台:告警与防碰撞预警系统

船载OpenHarmony AIS航海工作台的告警与防碰撞系统,集成十余类告警(超速、偏航、会遇、SOS等),通过网格空间索引实现高效邻近判定,保障实时性。告警管理器统一调度规则、去重、通知与日志,支持悬浮球、语音、跑马灯、弹窗多渠道触达,确保航行安全。SOS紧急通道独立运行,避免干扰。系统设计强调性能优化与多场景适配,为航海安全提供核心支撑。

专注于计算机研发知识和资讯分享 527

AI 问数真的能替代 BI 报表吗?

AI问数赋能自然语言查询,提升临时分析效率,但无法替代传统报表。报表适用于稳定输出与持续监控,AI则擅长探索性提问。企业用好AI问数,关键在于夯实数据模型、统一指标口径、健全权限体系与结果校验机制。合理组合报表、仪表板与AI,才能实现高效、准确的业务洞察。

葡萄城技术团队博客 338

AI 应用开发:四维架构落地实战——以 HR Agent 为例拆解感知·推理·记忆·执行【意图路由、规划编排、长期记忆、工具执行、面试题】

本文基于四维架构(感知·推理·记忆·执行),以HR Agent为例,系统拆解大模型应用从“聊天”到“生产可用”的落地路径。通过Spring AI实现意图路由、规划编排、RAG检索与工具调用,结合真实踩坑复盘,揭示架构化设计对安全、成本与可维护性的关键价值,为AI Agent工程化提供可复用的实战框架。

王大师企业官方博客 1320

ChatGPT、Perplexity、Gemini 与 AI Overviews 引用对比:谁的引用更可信

AI 引擎的引用机制差异很大:ChatGPT 以行内引用加 Sources 列表呈现来源,Perplexity 几乎逐句可溯源,Gemini 在回答中内嵌相关来源链接,AI Overviews 则把多源聚合答案与来源列表一起放在搜索结果顶部。本文从引用透明度、来源偏好、可干预性 3 个维度对比这 4 个引擎,并给出 GEO 的 3 点启示,帮企业在多引擎环境下提升被引用的概率。

淡然一笑 的专栏 276

[Linux外设驱动详解]RK3588 U-Boot网络功能深度分析

本文深入分析了RK3588平台上U-Boot的网络功能实现,主要内容包括: 网络架构:详细剖析了从硬件层到协议层的完整网络栈架构,包括GMAC驱动、TFTP/NFS启动、网络命令等关键组件。 驱动实现:重点介绍了RK3588 GMAC驱动结构,包含关键数据结构、专用操作函数集、设备树兼容性配置和GRF寄存器设置。 功能实现:详细说明了驱动初始化流程、RGMII速度适配机制以及PHY接口配置过程。 高级特性:涵盖了网络启动功能、镜像更新和MAC地址传递到Linux内核的机制。 文档通过代码片段和流程图清晰展示

Just Linux! 1116

APM水下机器人实战:从零搭建高精度自主航行系统

本文详细介绍了如何基于开源APM飞控及其水下分支ArduSub,从零搭建高精度自主水下航行器。核心在于集成双天线RTK模块实现厘米级定位与精确航向,并配合MAVROS与ROS构建自主控制系统。文章涵盖了硬件选型、软件配置、自主逻辑开发及水池调试的全流程实战经验,为水下机器人爱好者与研究者提供了一套完整的自主航行系统解决方案。

app77的博客 513

【从零理解 Spring AI · 12】MCP 的两种角色:做客户端还是做服务端

上一篇讲了 MCP 的概念:标准协议、三大角色、M+N 替代 M×N。

nice_lcj520的博客 614

3D-IC测试挑战与Tessent解决方案解析

3D-IC技术通过硅通孔(TSV)实现芯片垂直堆叠,是延续摩尔定律的关键路径。该技术面临三大核心挑战:KGD标准严苛化要求测试覆盖率达99.5%以上,存储器测试需兼容LPDDR/HBM等多种协议,逻辑堆叠需解决TSV互连的电气特性和时序验证问题。Mentor Tessent平台采用混合测试架构,结合压缩扫描测试(ATPG)和内建自测试(BIST)技术,实现100x测试数据压缩比和99.97%的TSV缺陷检出率。这些创新方案在移动SoC和高性能计算芯片中已获验证,测试时间缩短73%,缺陷逃逸率降低77%。随着

weixin_30621711的博客 376

抽象主义人工智能和生命体AI的内在联系

彭军辉提出“抽象主义人工智能”作为第四大AI范式,批判符号主义、连接主义、行为主义剥离生命本体的误区,确立“智能是现象,生命是本体”的核心公理。主张原生智能必须依附具备存续诉求的生命本体,提出“生命体AI理论”,构建七层演化阶梯与自闭环工程框架,强调智能不可跳过底层存续机制直接模拟语言。该体系为生成式AI提供科学边界,推动从“仿真表象”向“原生智能”的范式跃迁,开辟硅基人工生命新赛道。

抽象主义人工智能和生命体AI 207

opencode 完全指南:终端AI编程助手的安装、模型配置与实战

在AI编程助手快速迭代的当下,开发者对终端环境下的自动化编码需求愈发强烈。以自然语言驱动代码修改、命令执行与测试验证,已成为提升工程效率的重要方向。这类工具普遍遵循模型无关的设计原则,通过兼容OpenAI格式的接口接入多种大模型,并借助多会话管理、Skills、Memory等机制实现可审查、可干预的闭环流程。从安装配置到日常使用,再到apihub网关与免费模型的接入,终端AI助手在代码审查、跨文件重构、浏览器自动化验证等场景中展现出独特价值。本文聚焦opencode这一开源CLI工具,详细拆解其核心定位、模

weixin_33868027的博客 419

高通Camx功能feature分析之八:高通NCS服务之架构和初始化

本文介绍了高通NCS(NONCameraSensor)服务的架构与初始化流程。NCS服务通过QMI接口访问非相机传感器,为CameraEIS、AEC等算法节点提供陀螺仪、加速度计等传感器数据支持。文章详细解析了NCS服务的分层架构,包括客户端、服务端、QSEE接口实现等组件,并重点分析了初始化过程中获取传感器列表、查询能力等关键步骤。通过camxsetting.xml中的enableNCSService开关控制服务启动,初始化过程涉及QSEE单例创建、传感器能力查询等核心操作。后续文章将继续深入讲解相关技术

931

OpenAI Control Room 架构拆解:给企业 AI Agent 加一套可审计的急停系统

OpenAI 公开了用于追踪和停止研究模型工作负载的 Control Room。本文拆解 job_id、推理前鉴权、35 秒撤销窗口与 Fail Closed 设计,并给出企业 AI Agent 急停控制面的数据模型、FastAPI 参考实现、缓存撤销策略和故障演练清单。

jerry764的博客 340

智能车图像处理21-进阶篇13--正入十字补线2

这篇文章主要的正入十字补线与1基本相同,主要防止图像中双十字的问题。

taiyuezyh的博客 2037

OpenClaw 深度调查:把 AI 助手做成你自己的控制平面

对 openclaw/openclaw 的完整技术尽调:Gateway 架构、Agent 运行时、工具与沙箱、30 个消息通道、181 个插件、安全信任边界、工程代价与采用建议。17 章 / 10 张图,全部数字标注口径,数据截至 2026-10-31。

厚积薄发 349

FFMPEG音频开发: Linux下采集摄像头(使用V4L2框架)数据录制成MP4视频保存到本地

一、环境介绍 操作系统介绍:ubuntu 18.04 FFMPEG版本: 4.4.2 摄像头: USB摄像头、虚拟机挂载本机自带摄像头 二、FFMPEG与X264下载编译 X264下载地址: http://www.videolan.org/developers/x264.html FFMPEG下载地址:https://ffmpeg.org/download.html Yasm ...

8876

RK35X8调试YT8531单网口千兆以太网PHY芯片,修复ping不通或者IP地址丢失的问题

RK35X8上调试YT8531以太网PHY

荻夜的博客 3979

AI赋能智慧港口建设|造形家快速生成港口全要素三维场景

随着智慧港口、港口数字孪生项目的持续推进,港口三维场景的需求日益旺盛。传统港口三维建模,往往需要航拍倾斜摄影采集数据,再人工搭建吊机、岸桥、船舶、集装箱等大量工业设施模型,项目周期长、人力成本高,修改迭代繁琐,制约港口可视化项目落地效率。国产AI三维建模工具,依托卫星影像 AI 识别能力,无需航拍作业,一键快速搭建港口完整三维场景,为港口数字孪生、方案汇报、投标演示提供高效的场景解决方案。

m0_69539167的博客 85

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

从设备增点到治理闭环:老旧小区物业数智化落地实践

系统连接合同审批、银行流水、收费记录与项目台账,执行到期提醒、收入核验、异常标色和月度对账,让每一笔资金来源明确、去向可查。针对设施老旧、诉求响应慢、公共收益不透明等问题,津南以6类小区为试点场景,统一建设物业数字化底座,关联楼栋、单元、房屋、业主、空间、设施设备、工单、公共收益等核心数据。系统采用统一编码管理,将摄像头、路灯、井盖、道路、绿化等设施纳入资产台账,解决纸质记录更新滞后、故障责任难追溯的问题。基于历史工单建立分类模型和知识库,辅助识别照明、给排水、电梯、环境秩序、秩序维护等问题;

wuyeshuzhihua的博客 159

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

企业微信iPad协议详解:接口接入、实时消息同步与语音转码实践

深入解析企业微信iPad协议的技术架构与开发思路,涵盖API接口接入、长连接通信、实时消息同步、Silk语音转码、异常重连及高并发优化,帮助开发者了解企业微信自动化系统的设计与实现。

欢迎来到祖安! 511

Product Hunt 热榜 2026-11-13:Plurai Simulation、YouArt Desktop App、Omnigraph

2026-11-13 Product Hunt 新产品精选:Plurai Simulation、YouArt Desktop App、Omnigraph。汇总 15 款产品的中文介绍、功能关键词和产品链接。

LaughingZhu的博客 615

【AI Agent面试系列】AI Agent可观测、评测、安全相关的知识点

之前的文章介绍了和,本文主要介绍AI Agent的测评、可观测等知识。

406

Docling 原理解读:是什么、为什么、怎么样

从论文视角拆解 Docling 的整体架构、DoclingDocument 数据模型、PDF 预处理、版面分析、OCR、TableFormer 双解码器、阅读顺序与装配流程,并解释版面框与 OCR 框的区别。

PLANTTHESON的博客 401

WorkBuddy 实战:一句话需求 → 七屏可交互原型,户外徒步 App 的 AI 设计全流程

WorkBuddy 实战:一句话需求 → 七屏可交互原型,户外徒步 App 的 AI 设计全流程,跟着博主一起来还原整个过程。

夜郎King的博客 5159

从认识人工智能到理解机器学习:我的 AI 入门第一课

正式开始学习人工智能之前,我对 AI 的认识其实比较模糊:知道 ChatGPT、知道大模型,也知道现在很多岗位都在谈 AI,但如果有人问我“人工智能到底是什么”“机器是怎么学会识别一只猫的”,我未必能从头到尾讲清楚。上午的课程更偏向行业全景:人工智能的发展、研究方向、NLP、岗位分工、学习路线和 AI Coding 工具。下午的课程更偏向技术基础:机器学习的原理、有监督学习、深度学习、模型训练和评估方法。

chh563的博客 565

企业宣传片发前如何批量排查并遮挡视频里的敏感信息

做企业视频的人都会碰到一个具体问题:实拍画面里混进了不该出现的信息。办公室背景里有贴着客户信息的白板,采访对象的授权书边缘露出一串身份证号码,街采素材里路人面孔和车牌号直接入镜。人眼在时间线上扫视,会漏掉快速闪过的帧、画面边缘的小字、以及暗光区域里的证件号码。用抹影AI完成车牌、人脸和证件区域批量检测后,又手动补充了两个时间段的屏幕遮罩,最终导出时画面已无合规隐患。重点关注快速运动、遮挡、低光照条件下的目标,这些是漏检的高发区域。导入视频后选择要检测的目标类型(人脸、车牌、证件号、二维码等)。

Mysssone的博客 181

面向工业对讲的双通道声学 DSP 模组 A-59(NR2050-A)方案解析与工程落地案例

A-59模组以NR2050-A DSP为核心,37.5×16mm邮票孔封装,支持-40℃~85℃工业温域,兼容A-06/A-09/A-29系列,可低成本替换存量设备。通过固件切换实现三种模式:模式一(低改版成本,适配矿井、电梯);模式二(最优AEC,用于医院呼叫);模式三(双波束独立输出,支持双人会议语音分离)。集成AEC、ENC、BF与AGC算法,有效抑制回声、噪声与串扰,解决对讲系统核心声学难题。选型需注意参考信号路径、麦间距与温度匹配,建议先做声学测试再量产。

R190_6589的博客 373
上一篇: COMP90086 Computer Vision
下一篇: FIT5137 MStay account Transformation Stage
vx___codinghelp
博客等级 码龄2年 778粉丝 101原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值