a=7
b=imsotired #INCORRECT - should be "imsotired"
c=[len(b)-a]
print (c)
def the_sunny_day():
if 3**4>21 or not False and 3!=4:
return True
elif 54 >=54 or False and not True:
return False
print (the_sunny_day())
x = "milk"
y = "juice"
z = "pie"
if 8 % 2 == 4:
print (z)
elif 1 >= 3:
print (x)
else 3**3 == 27:
print (y)
a=(7==8)
b=(3==3)
b=a
print (b)
x=8
y=x
x=y
print (x)
mark="1"
maria="maria"
ggu="246810"
if mark==ggu[4]:
maria="mariahwang"
if mark.isalpha():
print ("mark is alpha")
elif len(maria)==5:
print (maria[0])
elif len("mark")!=ggu[1]:
print (maria.upper())
else:
print (ggu)
### MARIAHWANG
cat = "PRETTY"
pet = 'musthave32'
dragon = '13579'
cow = 1350
if cat.isalpha():
print("cat".upper())
if int(dragon)==13579:
print(cat.lower())
cow='1350'
if pet.isalpha() and cat.isalpha():
print('pet')
elif cow==dragon:
print (cow)
elif cow>=dragon:
print ("cow")
else:
print(int(dragon))
signal_color = input("색을 영문으로 입력하세요.")
if signal_color == "blue":
print ("신호등은 파란색입니다. 건너세요")
elif signal_color == "red":
print ("신호등은 빨간색입니다. 기다리세요.")
else:
print ("nothing")
if 10>11:
print "5"
elif 10>9:
print "8"
else:
print "10"
if x>8:
print ("Excellent")
elif 8>=x>5:
print ("Good")
elif 5>=x>3:
print ("Oh")
else
print ("Haha")
#정희윤
def cat_woman(a, b):
return a * b, a / b
cat,woman = cat_woman(10, 5)
print(cat, woman)
if len(friend)<=0 or hello.isalpha()
print ("mouse")
elif 10>3 and True
print ("card")
else hello.upper()="HELLO" #INCORRECT - should be ==
print ("window")
a = 7
b = "underground"
c = b[len(b)-a]
print (c)
INCORRECT - need : after if
if x>=90
print ("A")
else if 80<x<=90
print ("B")
else if 70<x<=80
print ("C")
else
print ("D")
s = 'superman'
b = 'batman'
if s > b:
print ('superman is stronger than batman')
elif s < b:
print ('superman is weaker than batman')
else:
print ('superman and batman are equal')
left = "Grape"
right = "Tomato"
if 8>9:
print len(left)
else:
print len(right)
spam = 8
egg = 7
spam = 3
egg = 6
print(spam%egg)
x = "python"
y = 2
print(x*y)
s = "pineapple"
t = "orange"
if len(s)> 11 and t.isalpha():
print("elite")
elif t[2]==s[4]:
print("great")
else:
print("excellent")
s = "pineapple42"
t = "orange"
if len(t)==5:
t = "water"
elif t[1] == s[4]:
print ("thrilled")
elif s.isalpha() or t.isalpha():
print ("happy")
else:
print ("nothing")
a = 3
b = 5
c = "my name is yunseop"
d = c[len(c)-(a+b)]
print (d)
if (3==4) and (10 % 3 = 1):
if 4 >3 and 19851 > 1238:
print ("this is correct")
if (1238 + 1239 = 2567) or (128391 != 1):
print ("You are a good person")
else:
print "hh"
If (6==5) and (10 ? 1 = 9);
if (3=3) and (4-4=0);
print "how"
else;
print "how to"
else;
print "hello"
a=2
b="higuys"
d=b[len(b)-a]
print (d)
a=18
b="kindergarten"
c= b[a-len(b)]
print (c)
cup="white"
bottle="black"
cup="black"
print cup
W = True
X = False
Y = False
Z = True
if W and X :
print "I'm very tired."
else Y or Z :
print "I'm very happy!"
age = int(input("Input Age:"))
if age >= 20:
print "Adult"
elif 10 <= age and age < 20:
print "Teenager"
else:
print "Baby"
2**3 = 8 and -(-(-2)) = -2
16 % 4 = 0 and 7 == 6 +3
35 / 5 != 7 and 3 + 4 = 7
30 < 20 or 3 *2 = 6
7*200 == 200*7 or 100*0.5 >= 50
if 10>11 :
print "5"
elif 10>9 :
print "8"
else:
print "10"
string_1 = "GeumGang"
string_2 = "wonderful"
string_3 = "economic"[5]
if "CO2".isalpha() or len("GeumGang")==str(7)
print "Gorani1"
elif "GeumGang University have wonderful campus".lower() = "%s university have %s campus" % (string1,string2) and "Pratice Make Pratice" == "Practice" + "and" + "Make" + "and" + "Practice"
print "Gorani2"
else:
print "Gorani3"
s = "icecream"
d = "speciality"
s = d
if len(s)>7 and len(d)==8:
print "professor"
elif 100%19>3*2 or 2*5 == len(s):
print "Mark"
else:
print "Santolucito"
print (35 / 5 != 7 and 25**0.5 == 53 % 8)
print (len("Hi") > len("Bye") and (False or 3+4 ==7))
a='b'
b='a'
a=b
print (a)
something = "party on saturday"
len(something)