# -*-coding:utf-8-*-
""" 如果注释里面需要中文 需要加上上面的代码"""
age = input('you think you input number ?')
age10 = int(age) + 10
print 'you age is ' + str(age10)
""" 这里需要注意 输出的时候 需要将age10转换为str """
ages = 3 * '5'
print type(ages)
"""<type 'str'>"""
jack1 = 3 * 5.0
print type(jack1)
"""<type 'str'>"""
print ('jack', 'hello', 'world')
print ('jack', 'java')
# 这是一个行注释
"""
这是一个行列注释
"""
print False == False
print False and False
print not True
# this is if
number = input('you input win number ')
if number == 10:
print 'yes '
elif number == 20:
print 'no'
# this is if two
hopeyou = raw_input("you name ")
if hopeyou == 'jack':
print'yes '
elif hopeyou == 'pcc':
print 'you name is' + hopeyou
elif hopeyou == 'kt':
print " yes"
else:
print 'hack'
# this is if elif
pwd = input('what is the passwordl ?')
if pwd == 'apple':
print 'win'
elif pwd == 'a':
print'root'
else:
print 'out '
问题说明:根据作者使用 好像在使用 raw_input的时候在控制台进行输入的时候,当输入String or char的时候不要加引号.但是如果使用是input的话,必须使用引号