由于时间关系,只能写部分代码,其他功能到时候加上

# -*- coding: utf-8 -*-
# python:2.x
__author__ = 'Administrator'
#为了2014年8月2号的到来,我的心情十分痛苦,之所以.....是因为......
from datetime import *
import sys,os,random
print u'注意:对于有对象的可以滚蛋'
class Magpies(object):
    l=[]#把内容加到这个列表里面
    def __init__(self,name,sex,year,):
        self.name=name#名字
        self.sex=sex#性别
        self.year=year#年龄
    def a1(self):#显示信息
        print u'你女朋友的名字:%s,性别:%s,年份:%s,给女朋友打%s分'%(self.name,self.sex,self.year,self.seco)
    def  standard(self,seco=100.0):#对女朋友评分标准
        print u'将结果告诉女朋友,在你的心里她的位置是多少分',seco
        if seco<=.0 and seco>=100.0:
            self.l.append(u'评分标准不能包含小于等于0或者大于等于100')
        else:
            if 99.<=seco<85.:
                self.l.append(u'评分标准在85分到99分之间--分类为:(0)数'.format(self.seco))
                print #不知道写什么内容
            elif 85.<=seco<70.:
                self.l.append(u'评分标准在70分到90分之间--分类为:(0)数'.format(self.seco))
            elif seco<=60.:
                self.l.append(u'评分标准在小于等于60--分类为:(0)数'.format(self.seco))
    def appraise(self,appraises):#对女朋友的外貌评价
        while True:
            if len(appraises)<5:
                print u'您太小气,对于你女朋友%s'%(appraises),u'强度越小,不行,试了白试'
            elif 5<len(appraises)<15:
                print u'您过于简单,对于你女朋友%s'%(appraises),u'强度中间,一般,可以试试'
            else:
                print u'您过于强大,对于你女朋友%s'%(appraises),u'强度不错,征服吧'
    def position(self,positions):#喜欢女朋友什么位置
        print positions
        dicts={'pos1':'face','pos2':'ear','pos3':'hand','pos4':'mouth','pos5':'eye','pos6':'skin',
              'pos7':'eyebrow'}#脸部,耳朵,手,嘴巴,眼睛,皮肤,眉毛
        if positions in dicts.keys():
            try:
                print u'选择的位置是:%s'%(dicts[positions])
            except Exception as s :
                print u'选择的位置无效%s'%(dicts[positions])
                if positions not in dicts.keys():
                    print u'系统随机帮你选择一个:%s'%(random.choice(dicts.keys()))
                if random.choice(dicts.keys())!=positions:
                    if random.randint(1,60)<20:
                        print u'对于您,我已经无法可话,你已经不在对您女朋友忠诚,系统给予你的分数是:%s'%(random.randint(1,60))
                    else:return True

猜你喜欢

转载自kongbai255.iteye.com/blog/2099247