我写的第一行python

#! /usr/bin/env python
#coding=utf-8
from pip._vendor.distlib.compat import raw_input
def isParity(x):
    if x%2==0:
        print x,"是偶数"
    else:
        print x,"是奇数" 

isParity(6)
'''
def f(x):
    result = 0
    while(x):
        result = result + x
        x = x-1
    return result
print(f(9))

input_message = raw_input("请输入你的名字:")

print(input_message)


for n in range(20):
    if n%2==0:
        print("偶数有:",n)

'''

 

 

;

Popular Programs