跳至主要內容

02-CS-UY 1114:Lab 2

AI悦创原创PythonPython一对一教学Python一对一辅导Python 辅导编程一对一教学少儿编程一对一NYU编程辅导NYU Python辅导PythonPython一对一教学Python一对一辅导Python 辅导编程一对一教学少儿编程一对一NYU编程辅导NYU Python辅导大约 2 分钟...约 678 字

Expressions, Operators, Math, Random, Number Systems

表达式,运算符,数学,随机,数字系统

You must get checked out by your lab CA prior to leaving early. If you leave without being checked out, you will receive 0 credit for the lab.

你必须在离开之前得到你的实验室CA的检查。如果你没有被检查就离开,你将得到0学分的实验室。

Restrictions

限制

The Python structures that you use in this lab should be restricted to those you have learned in lecture so far. Please check with your teaching assistants in case you are unsure whether something is or is not allowed!

你在本实验中使用的 Python 结构应该仅限于你在课堂上所学到的。如果你不确定某些内容是允许的还是不允许的,请向你的助教询问!

Create a new python file for each of the following problems.

为以下每个问题创建一个新的 python 文件。

Your files should be named lab[num]_q[num].py similar to homework naming conventions.

您的文件应该命名为 ' lab[num]_q[num].py ' 类似于作业命名惯例。

Problem 1: Binary and Other Number Systems Conversions

问题1:二进制和其他数字系统的转换

Convert the following numbers by hand:

手动转换以下数字:

Binary to Decimal: 010110102=?01011010_2 = ?

二进制到十进制: 010110102=?01011010_2 = ?

Decimal to Binary: 15310=?153_{10} = ?

十进制到二进制: 15310=?153_{10}= ?

Binary to Hexadecimal: 101001112=?10100111_2 = ?

二进制到十六进制: 101001112=?10100111_2 = ?

Hexadecimal to Decimal: 0xFDA16=?0xFDA_{16} = ?

十六进制到十进制: 0xFDA16=?0xFDA_{16} = ?

Problem 6: The Bell Curve

问题6:钟形曲线

公众号:AI悦创【二维码】

AI悦创·编程一对一

AI悦创·推出辅导班啦,包括「Python 语言辅导班、C++ 辅导班、java 辅导班、算法/数据结构辅导班、少儿编程、pygame 游戏开发、Web、Linux」,全部都是一对一教学:一对一辅导 + 一对一答疑 + 布置作业 + 项目实践等。当然,还有线下线上摄影课程、Photoshop、Premiere 一对一教学、QQ、微信在线,随时响应!微信:Jiabcdefh

C++ 信息奥赛题解,长期更新!长期招收一对一中小学信息奥赛集训,莆田、厦门地区有机会线下上门,其他地区线上。微信:Jiabcdefh

方法一:QQopen in new window

方法二:微信:Jiabcdefh

上次编辑于:
贡献者: AI悦创
你认为这篇文章怎么样?
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0
评论
  • 按正序
  • 按倒序
  • 按热度