파이썬 1일차

김현진·2020년 8월 26일
0

4주 프로젝트 기업협업을 하게 되었는데 기업측에서 백엔드 언어를 파이썬을 쓰라고 하여 오늘부터 파이썬 공부를 시작하게 되었다.

오늘 한거 코드 복사 붙여넣기

혹시 나중에 도움이 될까 업로드한다.

# 연습
"""
korean, english, math, science = map(int, input().split())

if(korean + english + math + science) / 4 >= 80:
    print('합격')
else:
    print('불합격')
"""
#########################

# list array = [];
# a = list(range(10,17,2))
# print(a,'배열')

# tuple은 안에 있는값을 변경을 못함. 읽기전용

# b = tuple((range(10,20,2)))
# print(b, 'tuple')
# c = 'helloworld'
# print(list(c), 'array')

# 시작하는 숫자는 -10 , 끝숫자 10
# startNum = int(input())
# # print(tuple(range(-10, 10, startNum)))
# # a = 10
# # print(10 + -a)

# a = list(range(10, 21))
#
# print(21 in a, len(a),a[0:4],a[0:],a[0::2],a[1:])
# year = [2011,2012,2013,2014,2015, 2016, 2017, 2018 ]
# population = [1,2,3,4,5,6,7,8,9,0]
# print(year[-3:])


# x = input().split()
# del x[-5:]
# print(x)

# x = input()
# y = input()
#
# print(x[1::2] + y[::2])

# lux = {'healtt': 1000 , 'mana': 334 , 'melee': 550}
# print(lux['healtt'])
# lux['power'] = 2000
# a = 100
#
# print(lux)

# x = {}
#
# health, health_regen, mana, mana_regen = input().split()
# a, b, c, d = map(int, input().split())
# x[health] = a
# x[health_regen] = b
# x[mana] = c
# x[mana_regen] = d
# print(x)

# cash = int(input())
# sale = input()
# print(cash-int(sale[4:]))

# 논리연산자 and(&&) or(||) not(1)
#
# # kor, eng ,math, sci = map(int,input().split())
# # if (kor > 100 or kor < 0) or(math > 100 or math < 0) or (eng > 100 or eng < 0) or (sci > 100 or sci < 0) :
# #     print('불합격')
# # else :
# #     if(kor + eng + math + sci) / 4 >= 80 :
# #         print('합격')


# if (kor + eng + math + sci) / 4 >= 80 :

# age = int(input())
# balance = 9000
# cash = 0
#
# if 7 <= age <= 12:
#     cash = 650
# elif 13 <= age <= 18:
#     cash = 1050
# else:
#     cash = 1250
#
# print(balance-cash)

# for i in reversed(range(10)):
#     print(i)
# a = [10, 20, 30, 40, 50]
#
# # tuple 및 string도 가능
# for j in a:
#     print(j)

# x = int(input())
#
# for i in range(1, 10):
#     print('{} * {} = {}'.format(x, i, x*i))

# import random
#
# i = 0
# while i != 6:
#     # 임의의 랜덤값 추출 1부터 6까
#     i = random.randint(1,6)
#     print(i)
# a = [1,2,3,4,5]
# # 배열에서 임의 값 출력
# print(random.choice(a), a)

# x = int(input())
# while x >= 1350:
#     x -= 1350
#     print(x)

# 숫자중 3이 포함되는 숫자는 출력되지 않게 하기
#
# start, stop = map(int, input().split())
#
# i = start
#
# while True:
#     if i > stop:
#         break
#     if i % 10 == 3:
#         i += 1
#         continue
#     print(i, end=" ")
#     i += 1

# 파이썬의 출력문은 print를 사용하며 두개의 옵션을 사용할 수 있습니다.
#
# - sep=" "
#  이 옵션을 이용하게 되면 print문의 출력문들 사이에 해당하는 내용을 넣을 수 있습니다. 기본 값으로는 공백이 들어가 있으며 이를 사용해 원하는 문자를 입력할 수 있습니다.
#
# - end=" "
#  이 옵션의 경우 print 문을 이용해 출력을 완료한 뒤의 내용을 수정할 수 있습니다. 기본 값으로는 개행(\n)이 들어가 있으며 이를 사용해 개행을 없에거나 원하는 문자를 입력할 수 있습니다.

# a,b = map(int, input().split())
# 
# for i in range(a, b+1):
#     if i % 35 == 0:
#         print('Fizz Buzz')
#     elif i % 7 == 0:
#         print('Fizz')
#     elif i % 5 == 0:
#         print('Buzz')
#     else :
#         print(i)
# 
# 
# c,d = map(int, input().split())
# for i in range(c, d+1): 
#     print('Fizz' * (i % 5 == 0) + 'Buzz' * (i % 7 == 0) or i)



























profile
기록의 중요성

0개의 댓글