Python while2 #Python - 30. 파이썬 while문 이번 시간에는 반복 문의 while 문을 배워보도록 하겠습니다. 반복문에는 for문과 while문이 있지요! 이전 시간에서 배워온 2020/01/16 - [Python] - #Python -15. 사용자 입력 받기 #Python -15. 사용자 입력 받기 파이썬, 모든 프로그램의 처리 동작 def sum(no): return no + 10 def sub(no): return no - 10 def mul(no): return no * 10 def div(no): return no / 10 print('수를 하나 선택해주세요.') mine = float(inpu.. kwongas.tistory.com 2020/01/22 - [Python] - #Python -20. 모듈 사용하기 #Python -20. 모듈.. 2020. 2. 6. #Python - 23. 파이썬 dictionary(딕셔너리) 만들기 리스트와 비슷한 딕셔너리 하지만, 딕셔너리는 키와 값이 쌍지어 저장되는 형태입니다! key_value = { 'key1' : '나는 key1의 값이다!', 'key2' : '나는 key2의 값이다!', 'key3' : '나는 key3의 값이다!' } """key_value 딕셔너리의 각 key가 가진 값은 무엇인가요?""" print("""key_value['key1']={}""".format(key_value['key1'])) print("""key_value['key2']={}""".format(key_value['key2'])) print("""key_value['key3']={}""".format(key_value['key3'])) 형태 [Key] : [Value] key1의 값은 value 이다.. 2020. 1. 23. 이전 1 다음