#实验一 Python编译器和pycharm的安装
# print("hello python!")
#实验二 判断2-100是否为素数
# import random as rd
# import numpy as np
# origin=[]
# sushu=[]
# zhishu=[]
# repeat=[]
# for n in range(2,101,1):
# if(n==2 or n==3):
# # print("Yes")
# sushu.append(n)
# continue
# flag = 0
# for i in range(2,int(n**0.5)+1,1):
oracle怎么登录数据库# if(n%i==0):
# # print("No")
# zhishu.append(n)
# flag = 1
# break
# if(flag == 0):
# # print("Yes")
# sushu.append(n)
# print(sushu.__len__())
# # print(sushu)
mac的java环境变量# for i in range(0,sushu.__len__(),1):
# print(sushu[i],end=" ")
# if(i%10 == 9):
# print(" ")
# print(" ")
# print("--------------------")
# print(zhishu.__len__())
# for i in range(0,zhishu.__len__(),1):
# print(zhishu[i],end=" ")
# if(i%10 == 9):
# print(" ")
# print(" ")
# print(zhishu)
#实验三 判断100个2-1000随机数是否为素数
# import random as rd
# import numpy as np
# origin=[]
# sushu=[]
# zhishu=[]
# repeat=[]
# for i in range(0,100,1):
# n = rd.randint(2, 1000)
# origin.append(n)
# if(n==2 or n==3):
# # print("Yes")
# if(n not in sushu):
# sushu.append(n)
# else:
# if (n not in repeat):
# repeat.append(n)
# continue
# flag = 0
# for i in range(2,int(n**0.5)+1,1):
# if(n%i==0):
# # print("No")
# if (n not in zhishu):
# zhishu.append(n)
# else:
# if(n not in repeat):
# repeat.append(n)
# flag = 1
# break
# if(flag == 0):
# # print("Yes")
# if (n not in sushu):
# sushu.append(n)shell经典书籍
# else:
# if (n not in repeat):
# repeat.append(n)
#
#
#
# print("--------------------")
# print(origin.__len__())
# print(origin)
# print("--------------------")
# print(sushu.__len__())
# print(sushu)
# print("--------------------")
# print(zhishu.__len__())
# print(zhishu)
# print("--------------------")
# print(repeat.__len__())
# print(repeat)
#实验四 函数方式实现实验三
# import random as rd
# import numpy as np
# def 素数(n):
# if (n == 2 or n == 3):
# # print("Yes")
# return True
# flag = 0
# for i in range(2, int(n ** 0.5) + 1, 1):
# if (n % i == 0):
# # print("No")
# return False
# flag = 1
# break
抖音python入门教程# if (flag == 0):
# # print("Yes")
# return True
#
# origin=[]
# sushu=[]
# zhishu=[]
# repeat=[]
# for i in range(0,100,1):
# n = rd.randint(2, 1000)
# origin.append(n)
# if(素数(n)):
# if(n not in sushu):
# sushu.append(n)
# else:
# if (n not in repeat):
# repeat.append(n)
# else:
# if (n not in zhishu):
# zhishu.append(n)
# else:
# if (n not in repeat):
it职业技能培训机构# repeat.append(n)
#
# print("--------------------")
# print(origin.__len__())
# print(origin)
# print("--------------------")
# print(sushu.__len__())
# print(sushu)
# print("--------------------")
# print(zhishu.__len__())
# print(zhishu)
# print("--------------------")
# print(repeat.__len__())
# print(repeat)
#实验五 类的定义和使用
# class Car:fork函数的实现过程
# price = 100000
# def __init__(self, c):
# lor = c
# def show(self):
# print('my price is '+str(self.price)+',my color is '+lor)
# car1 = Car("Red")
# car2 = Car("Black")
# lor, Car.price)
# Car.price = 110000
# Car.name = 'QQ'
# lor = "Yellow"
# lor, Car.price, Car.name)
# lor, Car.price, Car.name)
# print("------------------------------------")
# class Suv(Car):
# def __init__(self,color,num,speed):
# Car.__init__(self,color)
# self.num=5
# self.speed=220
# def show(self):
# print('my price is ' + str(self.price) )
# print('my color is ' + lor)
# print('my num is ' + str(self.num))
# print('my speed is ' + str(self.speed))
# def setPrice(self,prc):
# self.price = prc
#
# suv1 = Suv("White",7,260)
# suv1.price =180000
# suv1.show()
# suv1.setPrice(200000)
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论