# python basics **Repository Path**: cao-wang/python-basics ## Basic Information - **Project Name**: python basics - **Description**: No description available - **Primary Language**: Python - **License**: CC-BY-SA-4.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-03 - **Last Updated**: 2021-08-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # python basics ### 介绍 这里是我的Python学习源代码 ## week 1 这里是我的第一个Python代码 # a=int(input("请输入第一个整数:")) # b=int(input("请输入第二个整数:")) # c=int(input("请输入第三个整数:")) # if a>b: # t=a # a=b # b=t # if a>c: # t=a # a=c # c=t # if b>c: # t=b # b=c # c=t # print(a,b,c) # sum=1 # for i in range(1,11): # sum*=i # print(sum) # n=1 # sum=0 # while n>0: # n=int(input("请输入数字:")) # sum+=n # print(sum) # x=int(input("请输入第一个数:")) # y=int(input("请输入第二个数:")) # if x>y: # s=y # else: # s=x # for i in range(1,s+1): # if((x%i==0)and(y%i==0)): # d=i # print("最大公约数:"+str(d)) # i=1 # while i<=5: # j=1 # while j<=i: # print("*",end="") # j+=1 # print("") # i+=1 # i=1 # while i<=5: # j=1 # while j<=i: # print(j,end="") # j+=1 # print("") # i+=1 # i=0 # while i<5: # j=5 # a=1 # while j>i: # print(a,end='') # j-=1 # a+=1 # print() # i+=1 20:43:09 public class test3 { public static void main(String[] args) { int count = 0; for(int i=1; i<=50; i++) { boolean flag = true; for(int j=1; j0) { count1++; }else if(y<0) { count2++; } sum += y; } System.out.println("正数:"+count1+" 负数:"+count2+" 和:"+sum+" "+"平均值:"+((double)sum/ss.length)); } }