Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.5函数 #14

Open
request101 opened this issue Jun 3, 2019 · 0 comments
Open

1.5函数 #14

request101 opened this issue Jun 3, 2019 · 0 comments

Comments

@request101
Copy link

request101 commented Jun 3, 2019

def printRight(Username,Passwords):
Prints the usernames and passwords.
    The two valuse should be right.'''
    if(Username=='seven'):
        if(Passwords==123):
            print("登陆成功!")
        else:
            print("登陆失败!")
printRight('seven',123)
printRight('seven',1234)
print(printRight.__doc__)

def printList(i,sum):
    '''Prints the two numbers.
    The if the one of number is odd ,it should be sub.other number is even,it should be  sum.'''
    while(i<=100):
        if(i%2==0):
            sum+=i
        else:
            sum-=i
        i+=1
    print(sum)
printList(3,0)
printList(2,0)
print(printList.__doc__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant