package com.huang.boke.flowPath;public class While { public static void main(String[] args) { int i=0; int sum=0; while (i<=100){ sum = sum + i; i++; } System.out.println(sum); }}…
#定义一个类 继承Process类 from multiprocessing import Process import os class Download(Process): def __init__(self,num): Process.__init__(self) self.num = num # print(type(self.num))<class 'str'> def run(self): print('子进程(%s)开始执行,父进程为(%s)'%(os.getpid(),os.g…
#定义一个类 继承Process类 from multiprocessing import Process import os import time class jiecheng(Process): def __init__(self,num): Process.__init__(self) self.num = num #一算一个数的阶乘 def run(self): j = 1 for i in range(1,self.num+1): j = j * i print('%s的阶乘为:%s…