<repo_name>kaizhang32/CSSAtechWeb<file_sep>/kai.py
class User:
    def __init__(self, username, password, info, author):
        self.username = username
        self.password = <PASSWORD>
        self.info = info
        author="%s,%s,%s"%("lizhi","caoyudong","zhangzhihang")
        self.author = author
        
    def show_info(self):
        userinfo = "用户名：%s\n" % self.username
        userinfo = "密码：%s\n" % self.password
        userinfo = "个人信息：%s" %self.info
        print(userinfo)
        
    def edit_info(self, info):
        self.info = info
        
    def change_pwd(self,password):
        self.password = "<PASSWORD>"
        pwd = input("please enter current password:")
        if pwd == self.password:
            print("sucessful,please enter new pasword:")
            self.password=password
        
    def add_author(self,add_str):
        add_str="%s"%(",fangyue")
        self.author += add_str[0:8]

    def reduce_author(self):
        part1_author=self.author[0:17]
        part2_author=self.author[30:]
        self.author = part1_author + part2_author

    def retuen_username(self,username):
        self.username = username
        return
        
class Activity:
    def __init__(self, title, content, date, member_num=0):
        self.title = title
        self.content = content
        self.date = date
        self.member_num = str(member_num)
    
    def add_member(self):
        self.member_num = str(int(self.member_num)+1)

    def reduce_member(self):
        self.member_num = str(int(self.member_num)-1)

    def edit_content(self, content):
        self.content = content
        

def lst_function():
    lst = list()
    for i in range(1, 6):
        lst.append(i)
    for i in range(6, 11):
        lst.append(i)
    lst.remove(4)
    print(lst)
    
    
def dict_function():
    dic = dict()
    dic['Li'] = 10411234
    print(dic.get('Li'))
    print(dic.get('Lee', 0))
    
def onetoten_function():
    onetoten = list()
    for i in range(1,10):
        onetoten.append(i)
    print(onetoten)
        
def reduce1to10_function():
    from .onetoten import reduce1to10
    i=len(reduce1to10)
        if i>0:
            reduce1to10.pop(i)
            i-=1
        else:
            print("list is empty")
        
<file_sep>/README.md
<<<<<<< HEAD
# CSSAwebKai
CSSA web Python
=======
# CSSAtechWeb
>>>>>>> 5f20385bb7822561c8df27d5af42b45b93e8de51
<file_sep>/P5Danni Wang.py
# -*- coding: utf-8 -*-
"""
Created on Sun Oct  1 19:33:37 2017

@author: Danni
"""

def plural(word):  
    if word[-2:] in ['ay','ey','iy','oy','uy']:  
        return word+ 's'
    elif word[-2:] in ['cy','by','dy','fy','gy','hy','jy','qy','ky','ly','my','ny','py','ry','sy','ty','vy','wy','xy','yy','zy']:
        return word[:-1] + 'ies'  
    elif word[-1] in 'sxoz' or word[-2:] in ['sh', 'ch']:  
        return word + 'es'    
    else:  
        return word + 's'
    
t=input('Enter a sentence:')
l=t.split()
a=" ".join([plural(word) for word in l])

plural(a)
print(a)<file_sep>/P4Danni.py
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 24 15:36:47 2017

@author: Danni
"""

import random
def judge(guess):
 
    gue = int(guess)
 
    if (gue<0) or (gue>20):
        print('Wrong,Please input a number between 0 to 20.')
        guess = input('Please input a number between 0 to 20：')
        judge(guess)
        
    return gue
      

def istrue(n,guess):
    n=random.randint(1,21)
    print(n)
    b=str(input('Hello! What is your name?'))
    print('Well,',b,',I am thinking of a number between 1 and 20.')
    guess=int(input( 'Take a guess:'))
    guess = judge(guess)
    for a in range(1,6):
        if n!= guess:
            if guess<n:
                print('Your guess is too low.')
                guess=int(input('Take a guess:'))
                guess = judge(guess)
            
            elif guess>n:
                print('guess is high.')
                guess=int(input('Take a guess:'))
                guess = judge(guess)
               
            
            if n == guess:
                print('Good Job,',b,',You have guessed my number in',a+1,'guesses!')
                #guessed = True
                break
                 
            if a == 5:
                print('The number I was thinking of was',n)
    return;
        
istrue(n,guess)


        #break
    
             
             
#if a==6:    
   #print('The number I was thinking of was',n)
    <file_sep>/week1.py
#first question
class user()
    def _init_(self,user_name,user_pin,user_profile):
        self.name=user_name
        self.pin=user_pin
        self.profile=user_profile

    def default(self):
        self.name="zjzk99"
        self.pin="a2358686b"
        self.profile="male"

    def custom(self,user_profile):
        self.profile=user_profile

#second question
class activity()
    def _init_(self,title,matter,data,num):
        self.title=title
        self.matter=matter
        self.data=data
        self.num=num

    def add_num(self,plus):
        self.num=num+"%s" % plus
        
    def reduce_num(self,minus):
        self.num=num-"%s" % minus

    def custom(self,matter):
        self.matter=matter

#third question
list=[1,2,3,4,5]
for item in range(6,11)：
    list.append(item)
list.remove(4)
print(list)

#forth question
dic={key:"Kai_Zhang",
    value:"10430213"
     }
print "key: %s" % dic.get("key")
print "value: %s" % dic.get("value")
<file_sep>/week1answer.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 17 11:48:17 2017

@author: jackylee
"""


class User:
    def __init__(self, username, password, info):
        self.username = username
        self.password = <PASSWORD>
        self.info = info
        
    def show_info(self):
        userinfo = "用户名：%s\n" % self.username
        userinfo += "密码：<PASSWORD>" % self.password
        userinfo += "个人信息：%s" %self.info
        print(userinfo)
        
    def edit_info(self, info):
        self.info = info
        

class Activity:
    # member_num 这个参数可以设置默认
    def __init__(self, title, content, date, member_num=0):
        self.title = title
        self.content = content
        self.date = date
        self.member_num = str(member_num)
    
    def add_member(self):
        self.member_num = str(int(self.member_num)+1)
        '''
        也可以写成如下，方便理解：
        number = int(self.member_num) + 1
        self.member_num = str(number)
        '''
        
    def reduce_member(self):
        self.member_num = str(int(self.member_num)-1)
        '''
        也可以写成如下，方便理解：
        number = int(self.member_num) - 1
        self.member_num = str(number)
        '''

    def edit_content(self, content):
        self.content = content
        

def lst_function():
    lst = list()
    # for循环要会写
    for i in range(1, 6):
        lst.append(i)
    for i in range(6, 11):
        lst.append(i)
    lst.remove(4)
    print(lst)
    
    
def dict_function():
    dic = dict()
    dic['Li'] = 10411234
    # 学会使用dict.get()方法
    print(dic.get('Li'))
    
    # 如果不存在的话，这样做就不会报错
    print(dic.get('Lee', 0))
    
        <file_sep>/assign2.py
print('hello! python for everyone!!')
<file_sep>/P5Danni.py
# -*- coding: utf-8 -*-
"""
Created on Sun Oct  1 18:48:03 2017

@author: Kai
"""
def plural(word):  
  if word.endswith('y'):  
     return word[:-1] + 'ies'  
   elif word[-1] in 'sx' or word[-2:] in ['sh', 'ch']:  
      return word + 'es'  
   elif word.endswith('an'):  
      return word[:-2] + 'en'  
   else:  
       return word + 's'

t=input('Enter a sentence:')
l=t.split()
a=" ".join([plural(word) for word in l])

plural(a)
print(a)


