syntax1 Python Basic Syntax arithmatic operators 1 + 3 >> 4 1 - 3 >> -2 1 / 3 >> 0.3333333 5 // 2 # quotator >> 2 5 % 2 # remainder >> 1 divmod(5, 2) # quotator and remainder at once >> (2, 1) division by 0 occurs ZeroDivisionError if if a % 2 === 0 or a > 10: print("") elif a > b and a // b > 1: # // is for get the quotient print() else: print() # tenary operator '짝수' if a % 2 == 0 else '홀수' for문 for x in family: print(x,.. 2023. 8. 22. 이전 1 다음