Python input1 #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(input()) result_sum = sum(mine) print('선택된 수:', mine) print('{}+10={}'.format(mine, result_sum)) print('{}+10={}'.format(mine, sub(mine))) print('{}+10={}'.format(mine, mul(mine))) print('{}+10={}'.format(mine, div(mine))) #함수 시간에.. 2020. 1. 16. 이전 1 다음