熬过了基础的代码
# -*- coding: cp936 -*-shengri = 1993
zhoudan = "陈瑶"
jueqi = "刘明"
shengritishi =
xunhuanyuju = True
woaini = True
huihuang = True
suiyue = True
while xunhuanyuju:
lianxi = int(raw_input("你猜不到我出生:"))
if lianxi == shengri:
print u"你很厉害猜到了"
print u"我确实是1993"
xunhuanyuju = False
elif lianxi < shengri:
print u"你个傻子看我Q资料"
else:
print u"傻子"
print u"你就是个傻子"
print u"结束"
break
for tishi in range(len(shengritishi)):
print '告诉你答案把:', shengritishi
while woaini:
xihuanni = raw_input("我最后悔的人:")
import codecs
#xihuanni = codecs.open("utf-8", "w", "cp936")
if zhoudan == xihuanni:
print u"你永远不知道我后悔过"
woaini = False
elif zhoudan >= xihuanni:
print u"你个傻子看我Q资料"
print u"我小学在多少班"
continue
else:
print u"后悔过"
print u"也想过你,但是我知道不会在有机会了"
print u"这是最好的结果"
print u"忘记我把"
while huihuang:
cengjing = raw_input("程序截取输入的1-2-3-4位置:")
jiequ = unicode(cengjing, "gbk")
print u"程序截取输出:",jiequ
huihuang = False
while suiyue:
chenyao = raw_input("我最好的兄弟:")
def youqing(str):
print str;
return;
youqing("一起走");
if chenyao == jueqi:
print u"一生的朋友"
suiyue = False
else:
print u"最后一个朋友"
import time
print "程序当前时间 : %s " %time.ctime()
f = file("C:\love.txt")
while True:
line = f.readline()
if len(line) == 0:
break
print line,
f.close()
class woaini:
jianchibuxie = int(raw_input("曾经的一切:"))
def __init__(self, name):
self.name = name
print '(选择这条路,你们。 %s)' % self.name
woaini.jianchibuxie += 194
def __del__(self):
print '%s 我选择的路.' % self.name
woaini.jianchibuxie -= 194
if woaini.jianchibuxie == 193:
print '告别了193.'
else:
print '但是你依然 %d 离开了我身边.' % woaini.jianchibuxie
def sayHi(self):
print '曾经的一切我一再想起 %s.' % self.name
def howMany(self):
if woaini.jianchibuxie == 194:
print '我留在这里等你回来.'
else:
print '又离开了 %d 人.' % woaini.jianchibuxie
chenyao = woaini('都离开了')
chenyao.sayHi()
chenyao.howMany()
zhoudan = woaini('我没后悔过')
zhoudan.sayHi()
zhoudan.howMany()
chenyao.sayHi()
chenyao.howMany()
raw_input()
能翻译成易语言吗 代码现在看者就迷茫了
页:
[1]