上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: 一.数组的基本使用 public class demo{ public static void main(String[] args){ //使用数组四部走 int[] a; //声明数组 a = new int[5]; //分配空间 for(int i=0;i<5;i++){ a[i] = i; 阅读全文
posted @ 2020-03-03 19:03 Crown-V 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 一.猜拳游戏 import java.util.Scanner; public class demo{ public static void main(String[] args){ Scanner data = new Scanner(System.in); System.out.println( 阅读全文
posted @ 2020-03-03 11:02 Crown-V 阅读(562) 评论(0) 推荐(0) 编辑
摘要: 一.类、实例化(对象)、继承、多态 #创建类 class Human(object): """ 这里是文档注释 """ type = "人类" #类变量 def __init__(self,name,age): #初始化方法 self.name = name #实例化属性(变量) self.age 阅读全文
posted @ 2020-03-01 18:29 Crown-V 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 一.多态 #类的多态 class Animal(object): #Animal类继承object def __init__(self,color): self.color = color def eat(self): print("动物在吃!") def run(self): print("动物在 阅读全文
posted @ 2020-03-01 13:27 Crown-V 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 一.类的继承 #类的继承 class Animal(object): #Animal类继承object def __init__(self,color): self.color = color def eat(self): print("动物在吃!") def run(self): print("动 阅读全文
posted @ 2020-03-01 13:17 Crown-V 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 一.类的封装 #类的封装 class Card(object): def __init__(self,num,pwd,ban): self.num = num self.pwd = pwd self.__ban = ban #封装(私有变量) def __cun(self): #方法私有 print 阅读全文
posted @ 2020-03-01 12:56 Crown-V 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 一.类的创建 #类的实例化 class Dog(object):#object类,o小写 type = "宠物" #类变量 def __init__(self,name,age): #初始化方法 self.name = name #实例变量(属性) self.age = age self.run() 阅读全文
posted @ 2020-03-01 09:55 Crown-V 阅读(1389) 评论(0) 推荐(0) 编辑
摘要: 一.简单的通信(客户端) #client客户端.py import socket client = socket.socket() #生成socket连接对象 client.connect(("localhost",8088)) #和目标机简历连接 while True: data = str(in 阅读全文
posted @ 2020-03-01 08:56 Crown-V 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 一.安装的第三方模块 $ sudo pip3 install --upgrade pip $ sudo pip3 install pillow //window pip3 install pillow 二.RGB转换为黑白度的简单公式 gray = 0.2126 * r + 0.7152 * g + 阅读全文
posted @ 2020-02-28 11:02 Crown-V 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 一.柱状图 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>柱状图</title> <script src="JS/echarts.js"></script> <style> #chart{ width: 400px; heig 阅读全文
posted @ 2020-02-27 17:20 Crown-V 阅读(309) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 下一页