The first day of work the first day of work

The first day of work

 

 

 

 

Copy the code
n=1
while n<11:
    if n== 7:
       pass
    else:
        print(n)
    n=n+1
    
    
   
Copy the code

 

 

 

Copy the code
sum_1 = 0 
num_1 = 1 
while num_1 <101: 
    sum_1 + num_1 
    num_1 num_1 + = 1 
    
print (sum_1)
Copy the code

 

 

 

Copy the code
num_1=1
while num_1<101:
    temp=num_1%2
    if temp ==0:
        print(num_1)
    else :
        pass
    num_1=num_1+1
    
Copy the code

3. The outputs of all odd-numbered 1-100

 

 

 

Copy the code
num_1=1
while num_1<101:
    temp=num_1%2
    if temp ==0:
        pass
    else :
        print(num_1)
    num_1=num_1+1
    
Copy the code

Copy the code
num_1=1
sum_1=0
while num_1<101:
    sum_1+=num_1*(-1)**(num_1-1)
    num_1=num_1+1
print(sum_1)
Copy the code

 

 

Copy the code
passwd=input('请先输入第一次密码:')
user_id =input('请输入这个登陆密码')
n1=2
while n1:
    if user_id==passwd:
        print('输入正确:')
        break
    else:
        user_id =input('请输入这个登陆密码:')
    n1=n1-1
if n1==0:
    print('不好意思机会用完都没有输入正确;')
Copy the code

 

 

 

Copy the code
n=1
while n<11:
    if n== 7:
       pass
    else:
        print(n)
    n=n+1
    
    
   
Copy the code

 

 

 

Copy the code
sum_1=0
num_1=1
while num_1<101:
    sum_1+=num_1
    num_1=num_1+1
    
print(sum_1)
Copy the code

 

 

 

Copy the code
num_1=1
while num_1<101:
    temp=num_1%2
    if temp ==0:
        print(num_1)
    else :
        pass
    num_1=num_1+1
    
Copy the code

3.输出1到100所有的奇数

 

 

 

Copy the code
num_1=1
while num_1<101:
    temp=num_1%2
    if temp ==0:
        pass
    else :
        print(num_1)
    num_1=num_1+1
    
Copy the code

Copy the code
num_1=1
sum_1=0
while num_1<101:
    sum_1+=num_1*(-1)**(num_1-1)
    num_1=num_1+1
print(sum_1)
Copy the code

 

 

Copy the code
passwd = input ( 'Please enter the password for the first time:') 
user_id = the INPUT ( 'Please enter the login password') 
N1 = 2 
the while N1: 
    IF user_id == passwd: 
        Print ( 'entered correctly:') 
        BREAK 
    the else: 
        user_id = input ( 'Please enter the login password:') 
    N1 = N1-1 
IF N1 == 0: 
    Print ( 'sorry run out of opportunities are not entered correctly;')
Copy the code

Guess you like

Origin www.cnblogs.com/ab461087603/p/11823338.html