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

AI悦创·编程一对一
AI悦创·推出辅导班啦,包括「Python 语言辅导班、C++ 辅导班、java 辅导班、算法/数据结构辅导班、少儿编程、pygame 游戏开发、Web、Linux」,全部都是一对一教学:一对一辅导 + 一对一答疑 + 布置作业 + 项目实践等。当然,还有线下线上摄影课程、Photoshop、Premiere 一对一教学、QQ、微信在线,随时响应!微信:Jiabcdefh
C++ 信息奥赛题解,长期更新!长期招收一对一中小学信息奥赛集训,莆田、厦门地区有机会线下上门,其他地区线上。微信:Jiabcdefh
方法一:QQ
方法二:微信:Jiabcdefh
1. 欢迎来到 R 语言
你好,我是悦创。
R 语言是应用最广泛的统计编程语言。
而且 R 语言它是数据科学家和分析师的首选。
在本课程中,我们将学习R语言的基础知识,了解如何创建存储和操作数据的程序、以及如何使用各种数据集执行数据分析任务,以及如何使用图形和图表可视化结果。
本课程学习的技能可应用于任何与数据相关的领域,包括金融、数据科学、机器学习等。
Question: 1
In the following code:「D」
size = 20
x = 100
y = 200
ball = Circle(size)
circle.set_position(x, y)
Question 1
Write a function that takes one parameter - a float which represents a temperature in Celsius - and returns a float which represents that temperature in Fahrenheit.
Then, write a function that does the opposite conversion.
Here are the formulas for temperature conversion:
Notes: Refer to the Lennard-Jones (L-J) pair potential for solid Argon. You need to know the form of this potential along with the smooth cut-off to zero that is needed for modeling studies.
Both the potential and the cut-off are described in Prof. Vitek’s notes in a separate file titled the L-J potential. Please read this before attempting the homework or wait until Sep 12 class lecture to know more. In the meantime, you may look up or convince yourself what close-packed crystal structures are in one, two and three dimensional space. You may search the web if you are not familiar with this concept. Once you know how a close-packed structure is defined, you should be able to figure out the close-packed lattice in two dimensions. Draw a rough sketch by hand or make a plot using a code and identify how many neighbors an atom has in this lattice. Make a table of the nearest neighbors, next-nearest neighbors, etc., at least up to the fourth neighbor shell along with their distances in terms of a lattice parameter ‘a’ for the lattice. The pair potential only depends on the distance between the atoms and not their orientation. Such potentials are called “central” potentials in physics. With this background, you may proceed to do the homework. Please prepare your answers in the form of a report (in pdf format) where you explain your thinking and procedure in words briefly before solving the problem.
1. 理解变量——生活中的例子
1.1 从字面意思去理解
- 变:变化
- 量:大小
1.2 举个例子🌰
假如,你是班级当中的课代表,每个月需要统计班级中每个学生的月考成绩。月考成绩会每个月一张纸,每张纸上都会依次记录每个学生的成绩越到成绩,例如:
- 李雷 98分
- 马冬梅 89分
- 刘奕彤 96分
- ......
某一天,老师要看刘奕彤 1月、2月、3月的成绩,这个时候作为课代表的你需要怎么办。——总不能直接把每个月的月考成绩单直接给老师,显然是不合适的。
1. 数字型的特点
In [2]: 1 + 1
Out[2]: 2
In [3]: 1 + 1.0
Out[3]: 2.0
In [4]: 2 - 1
Out[4]: 1
In [5]: 2 - 1.0
Out[5]: 1.0
In [6]: 2 * 1
Out[6]: 2
In [7]: 2 * 1.0
Out[7]: 2.0
In [8]: 2 * 1
Out[8]: 2
In [9]: 9 / 3
Out[9]: 3.0
1. 数字型「int、float」
1.1 代码示例
- 整型
int_num = 1
t = type(int_num)
print(int_num)
print("int num type is:>>>", t)
print("直接检测数据类型,并输出:>>>", type(int_num))
# output
1
int num type is:>>> <class 'int'>
直接检测数据类型,并输出:>>> <class 'int'>