自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 pycharm 中自定模块导入报错问题

pycharm 中自定模块导入报错问题在目录下点击Mark Directory as ---->Sources Root

2020-12-13 12:39:30 98

原创 Java笔记-打印三角形

public class sanjiao { public static void main(String[] args) { for (int i = 1; i <=5; i++) { for (int j = 5; j >=i; j--) { System.out.print(" "); } for (int j = 1; j <=i; j++) {

2021-12-14 14:02:12 355

原创 Java笔记-增强for循环

public class Newfor { public static void main(String[] args) { int[] arr = {1,2,3,4,5}; for (int i=0;i<arr.length;i++){ System.out.println(arr[i]); } for (int a:arr){ System.out.println(a); .

2021-12-14 13:44:15 225

原创 Java笔记-循环结构

do…while和while循环的区别为while先判断再执行,dowhile先执行后判断。dowhile总是保证循环体至少执行一次!,这是他们的主要差别用for循环写出1-1000能被5整除的数,并且每行输出3个public class Fordemo1 { public static void main(String[] args) { for (int i=1;i<=1000;i++){ if (i%5==0){

2021-12-09 11:30:22 302

原创 如何用Scanner接收char类型?

我在使用switch语句时,当我用scanner去接收char类型时 会提示报错,那么应该怎么去接收char类型呢?import javax.swing.*;import java.lang.reflect.Array;import java.util.Scanner;public class test { public static void main(String[] args) { System.out.println("请输入你的成绩!"); Sc

2021-12-09 10:19:02 2551

原创 Java笔记-用户交互scanner

Scanner s = new Scanner(System.in)String str = s.next()/nextLine();import javax.swing.*;import java.lang.reflect.Array;import java.util.Scanner;public class test { public static void main(String[] args) { int a; float b;

2021-12-08 10:19:31 159

原创 Java笔记-逻辑运算符,位运算符

逻辑运算符&& 与 两个变量都为真,结果才为ture|| 或 其中一个变量为真,结果为true! 非 如果是真则变为假 如果为假则变为真位运算符<< *2.>> /2字符串连接符 +public class test { public static void main(String[] args) { int a = 10; int b = 20;

2021-12-07 14:37:20 83

原创 Java笔记-基本运算符

a++与++a的区别:```javapublic class test { public static void main(String[] args) { int a= 3; int b = a++; System.out.println(b); //a先赋值给b 再自增 b值为3 System.out.println(a); //a值为4 }}public class test { publi.

2021-12-07 14:09:56 344

原创 java笔记-变量常量作用域

局部变量必须声明和初始化值实例变量:从属于对象.如果不自行初始化,这个类型的默认值0 0.0类变量:static常量 final 常量名 = 值; 常量名一般使用大写字符布尔值默认是false修饰符 不存在先后顺序...

2021-12-07 11:34:26 95

原创 Python生成表命令python manage.py makemigrations 异常解决方法

**ERRORS:goods.GoodsCategory.cag_img: (fields.E210) Cannot use ImageField because Pillow is not installed. HINT: Get Pillow at https://pypi.python.org/pypi/Pillow or run command "pip install Pillow".goods.GoodsInfo.goods_img: (fields.E210) Cannot

2020-12-16 11:11:14 628 1

原创 python中用math.pi输出结果时保留小数的方法

python中用math.pi输出结果时保留小数的方法当我们计算圆的面积时 需要利用πr^2 计算这时我们需要导入math模块 利用math.pi显然结果过长 若我们想让只保留两位小数的话 进行如下操作1位同理...

2020-12-13 11:55:47 3931

空空如也

空空如也

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

TA关注的人

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