自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Hollen0318的博客

Zs.Forever

  • 博客(24)
  • 资源 (1)
  • 收藏
  • 关注

原创 PythonER随机网格&数据可视化实现"以SEIR传播动力学模型实验为例"

SEIR传播动力学模型 什么是SEIR传播动力学模型? 经典SEIR模型将人群分为S (Susceptible,易感者),I (Infected,感染者),E (Exposed,潜伏者)和R (Recovered,康复人群)。 本文根据SEIR传播动力学模型,利用Python实现生成ER随机网格、并在网格间随机结边、模拟SEIR型传染病传播 该实验可分为两个步骤进行: 一、生成一个ER...

2020-05-06 10:02:11 4787 7

原创 Python时间函数驱动&函数抽象化分离应用"以呈现日历实验为例"

打开CSDN看见一个这么可爱的广告,进去看了看 这广告也太可爱= =,激动码字的心情一下子更,激动了哈哈哈哈 里面是怎样的你们自己去看叭,我点开看看,感觉还不够浪漫~ 今天小白自己完成了一项工程,打印一个日历。 老师说的好,很多年轻的程序员不经过计划,直接开始码字。 这次我系统的思考了如何完成这项工程。 分为两步 获得年份月份 打印出日历 是不是看上去很easy呢? 然而并不是,继续分析。 ...

2020-03-20 16:03:07 622

原创 Python字符串格式函数应用&参数函数应用"以打印素数实验为例"

今日小白再次尝试数字打印。 这次是打印前50个素数。 如何确定一个数不是素数呢? 这要从素数的定义出发: 素数是指除了1与本身外,无乘因子的数。 所以我们可以用i(从2到该数)与该数进行余数除法%。 如果余数除法结果为0,说明i是该数的余数。 也说明它不是素数。 为了应用参数函数,我们进行一个简单的分析 ——————————————————————————————— 我们首先需要建立一个判断是否为...

2020-03-15 21:15:03 320

原创 Python字符串格式函数&循环语法应用"以数字金字塔实验为例"

小白第一次尝试用Python作图,遇到了小困难。 困难不是在想如何控制空格长度,打印有顺序有规律的字符。 而是在涉及到两位数的时候,整体移位。 遇到的问题是这样的: a = eval(input("Enter the number of lines: "))+1 for i in range(1,a): #分行 for b in range(3*a,0,-1): ...

2020-03-15 20:19:46 1089

原创 Python·Turtle画笔应用:"Hello word"——Java小白转征Python

这是写的第一条Python程序 Python一定是最简单流利的语言 要好好学习! 附加一张很可爱的皮卡丘 import turtle turtle.color("red") turtle.showturtle() turtle.circle(40) turtle.penup() turtle.forward(80) turtle.pendown() turtle.circle(40) turtl...

2020-03-01 21:17:28 320

原创 Java面向对象静态方法&数组列表参数应用"以购物订单实验为例"(进阶)

Lab: Write classes to model a shopping list. Make an Item class that represents a grocery item’s name and price, such as tissues for $3. Also implement an ItemOrder class that represents a shopper’s d...

2019-12-04 10:00:00 762

原创 Java面向对象静态方法及域值控制&域值四则运算"以计算器实验为例"(初级)

*Create a class named Calculator. A calculator has a method to add digits to a running total. The user can also press operator keys such as + or * and then enter digits of a second number. When the us...

2019-11-14 11:34:00 425

原创 Java面向对象静态方法及域值控制&日周时分进制方法"以时钟对象实验为例"

Suppose you are given a class named ClockTime with the following contents: 假设你有一个包含下列内容名为“时钟时间”的组: Write an instance method advance that will be placed inside the ClockTime class. The method accepts ...

2019-11-12 09:51:17 310

原创 Java随机数应用&交互输入比较"以乘法训练实验为例"

Q21.This program helps you practice multiplication by asking you random multiplication questions with numbers ranging from 1 to 30 and counting how many you solve correctly. 14 * 8 = 112 Correct! 5 * ...

2019-11-05 15:10:23 255

原创 Java参数应用&for循环作图“以漩涡图形实验为例”

Q21. 写一条利用for循环程序画出下面的图形。窗口大小为:170 x 170 px “spiral” 从 (0,10),向右 160,向下 150,向左 150, 向上140… import java.awt.*; //调取图形包 public class Q28 { //这个实验看上去很复杂,其实是很入门的算法 public static void main(String[] args)...

2019-11-05 15:00:18 465

原创 Java字符串参数应用&计词数避免超出数组范围“以计字符串词数实验为例”

Q17. Write a method named wordCount that accepts a String as its parameter and returns the number of words in that string. Words are separated by spaces. wordCount(“the quick brown fox”) returns 4 Q1...

2019-11-02 11:33:37 299

原创 Java字符串参数介数组应用&忽略空格字符串相等判断"以字符串相同实验为例"

Q16. Write a method named areAnagrams that accepts two Strings as parameters and returns whether those strings contain the same letters (in any order). areAnagrams(“bear”, “bare”) returns true areA...

2019-11-02 10:26:53 840

原创 Java数组参数应用&输出数组递增数列"以输出最长数组递增数列实验为例"

Q14. Write a method called longestSortedSequence that accepts an array of integers as a parameter and that returns the length of the longest sorted (nondecreasing) sequence of integers in the array Q1...

2019-11-02 09:31:52 752

原创 Java数组参数应用&合并数组"以合并数组实验为例"

import java.util.*; import java.util.Scanner; public class Q13 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner console = new Scanner (System.in); /*System....

2019-10-31 11:42:01 252

原创 Java数组参数应用&数组相等判断"以样本数组相等判断为例"

Q12. Write a method named equals that accepts two arrays of integers as parameters and returns true if they contain exactly the same elements in the same order, and false otherwise. Note that the arra...

2019-10-31 11:22:14 249 1

原创 Java数组参数应用&数组间数值覆盖"以数组间数值覆盖实验为例"

Q11. Write a method named copyRange that takes as parameters two arrays a1 and a2, two starting indexes i1 and i2, and a length l, and copies the first l elements of a1 starting at index i1 into array...

2019-10-31 10:25:40 567

原创 Java数组参数应用&数组偶数识别"以数组偶数比实验为例"

Q10. Write a method named percentEven that accepts an array of integers as a parameter and returns the percentage of even numbers in the array a s a real number. For example, if a variable named nums...

2019-10-30 08:47:44 299

原创 Java数组参数应用&数组间差"以最小数组间差实验为例"

Q9. Write a method named minGap that accepts an integer array as a parameter and returns the minimum ‘gap’ between adjacent values in the array. The gap between two adjacent values in a arra...

2019-10-30 08:19:32 298

原创 Java逐数读取文件并处理打印"以温度读数实验为例"

import java.io.*; import java.util.Scanner; public class Q12 { public static void main(String[] args) throws FileNotFoundException { // TODO Auto-generated method stub Scanner input = new ...

2019-10-27 09:51:50 365

原创 Java筛除字符方法&替换字符"以html源文件实验为例"

import java.io.*; import java.util.Scanner; public class Q11 { public static void main(String[] args) throws FileNotFoundException { // TODO Auto-generated method stub Scanner input = new...

2019-10-27 09:36:02 317

原创 Java读取文档分类赋权值&末行缺失处理"以分类赋权实验为例"

import java.io.*; import java.util.Scanner; public class Q10 { public static void main(String[] args) throws FileNotFoundException { // TODO Auto-generated method stub Scanner input = new...

2019-10-26 10:01:49 660

原创 Java读取文件并逐行打印众名&末行字符串保留方法"以寻找众名实验为例"

import java.io.*; import java.util.Scanner; public class Q9 { public static void main(String[] args) throws FileNotFoundException { // TODO Auto-generated method stub Scanner input = new ...

2019-10-25 21:00:52 338

原创 Java避免末尾字符串换行&读取文件段行词拆分"以打印重复字符串实验为例"

import java.io.*; import java.util.Scanner; public class Q8 { public static void main(String[] args) throws FileNotFoundException {//避免寻找文件失效 // TODO Auto-generated method stub Scanner in...

2019-10-25 18:28:29 317

原创 Java百分比计算以及显示方法“以掷硬币实验为例”

import java.io.*; import java.util.Scanner; import java.text.DecimalFormat; import java.text.NumberFormat; public class Q7 { public static void main(String[] args) throws FileNotFoundException {...

2019-10-25 15:02:47 408

DrawingPanel.java

Java作图所需的文件,将其复制在作图文件附近即可。在class前要注意写import Java.awt.*,"DrawingPanel"

2019-11-05

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除