IF문
-
04. 연습문제프로그래밍/Python 2021. 1. 12. 13:54
wikidocs.net/42527 03장 연습문제 Q1. 다음 코드의 결과값 shirt a = "Life is too short, you need python" if "wife" in a: print("wife") elif "python" in a and "you" not in a: print("python") elif "shirt" not in a: print("shirt") elif "need" in a: print("need") else: print("none") Q2. 1부터 1000까지의 자연수 중 3의 배수의 합 result = 0 i = 1 while i 5: break print(‘*’ * i) Q4. for문을 사용해 1부터 100까지의 숫자 출력 for i in range(1, 101)..