digit1 = 10
digit2 = 2.2
string1 = "fun-coding"
print (type(digit1))
print (type(digit2))
print (type(string1))
code = '000660\n00000102\t12312312'
print (code)
code = '000660\n00000102\t12312312'
print (code)
print ('000660\t00000102\t12312312')
print ('Hello\nHello\nHello\nHello\nHello\nHello\n')
digit1 = input()
digit2 = input()
print (digit1, digit2)
digit1 = input()
digit2 = input()
if digit1 > digit2:
print (digit1)
else:
print (digit2)
digit1 = input()
digit2 = input()
if int(digit1) > int(digit2):
print (digit1)
else:
print (digit2)
digit1 = input()
print (type(digit1))
digit1 = input()
digit1 = int(digit1)
digit1 = input()
digit1 = int(digit1)
if digit1 % 2 == 0:
print ("짝수")
else:
print ("홀수")
digit1 = 8
digit2 = 5
digit3 = 3
if digit1 < digit2:
min = digit1
else:
min = digit2
if min < digit3:
print (min)
else:
print (digit3)
digit1 = int(input())
digit2 = int(input())
digit3 = int(input())
if digit1 < digit2:
min = digit1
else:
min = digit2
if min < digit3:
print (min)
else:
print (digit3)
digit = 9
if digit <= 100 and digit >= 81:
print ("A")
elif digit <= 80 and digit >= 61:
print ("B")
elif digit <= 60 and digit >= 0:
print ("C")
digit = int(input())
if digit <= 100 and digit >= 81:
print ("A")
elif digit <= 80 and digit >= 61:
print ("B")
elif digit <= 60 and digit >= 0:
print ("C")
personal_id = "800001-1231231"
print (personal_id[0:2])
personal_id = input()
print (personal_id[0:2])
personal_id = "800001-1231231"
print (personal_id[7])
personal_id = input()
print (personal_id[7])
personal_id = "800001-1231231"
print (personal_id[7])
personal_id = "991002-2012232"
if personal_id[7] == "1":
print ("남성")
elif personal_id[7] == "2":
print ("여성")
personal_id = input()
if personal_id[7] == "1":
print ("남성")
elif personal_id[7] == "2":
print ("여성")
else:
print ("wrong personal ID")
mystr = "a man goes into the room..."
mystr = "a man goes into the room..."
print (mystr)
mystr = "a man.goes into the room..."
print (mystr.strip("."))
code = ' 000660\n '
code = ' 000660\n '
print (code.strip(' \n'))
python_desc = "Python is an interpreted high-level programming language for general-purpose programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace."
python_desc = "Python is an interpreted high-level programming language for general-purpose programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace."
counts_Python = python_desc.count("Python")
print (counts_Python)
python_desc = "Python is an interpreted high-level programming language for general-purpose programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace."
python_desc = "Python is an interpreted high-level programming language for general-purpose programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace."
print (python_desc.count("p"))
letters 라는 변수에 들어 있는 문자열에서 두 번째와 네 번째 문자를 출력하라
letters = "python"
출력 예:
y
h
letters = "python"
# print (letters)
print (letters[1])
print (letters[3])
letters = input()
if letters.find("n") >= 0:
print ("0")
else:
print ("-1")
letters = input()
if letters.find("n") >= 0:
print ("n 이 들어있습니다.")
else:
print ("n 이 안들어있습니다.")
지역 코드 | 출생 지역 |
---|---|
00 ~ 08 | 서울 |
09 ~ 12 | 부산 |
string1 = "991002-1012232"
print (string1[8:10])
string1 = "10"
# print (string1, type(string1))
string1 = int(string1)
# print (string1, type(string1))
if string1 >= 0 and string1 <= 8:
print ("서울")
elif string1 >= 9 and string1 <= 12:
print ("부산")
string1 = input()
string1 = int(string1[8:10])
if string1 >= 0 and string1 <= 8:
print ("서울")
elif string1 >= 9 and string1 <= 12:
print ("부산")
letters = "Dave,David,Andy,2222,3123123,LLL"
letter_list = letters.split(",")
print (letter_list)
for letter in letter_list:
print (letter)
filename = 'exercise01.docx'
filename = 'exercise01.docx'
print (filename.split(".")[0])