● 개발환경
URL : https://replit.com/@uyijune15
uyijune15
Run code live in your browser. Write and run code in 50+ languages online with Replit, a powerful IDE, compiler, & interpreter.
replit.com
● 학습 내용
1) 줄바꿈
print("Hello World!\nHello World!\nHello World!")
2) 연결
print("Hello" + " " + "June")
3) 입력
input("What is your name?")
: input 함수 안의 문장이 출력되고 입력을 받는다.
4) 출력 + 입력
print("Hello, " + input("What is your name? ") + "!")
: input 함수 안의 문장이 출력되고 입력을 받은 후에, print 함수 안의 문장이 출력된다. 즉, Hello, June!이 출력된다.
5) 주석
# 이것은 주석이다.
< command + / > : 주석 & 해제
< command + z > : 해제
6) 변수
name = input("What's your name? ")
print("name: " + name)
print("count: " + str(len(name)))
# len(): 문자열 글자 수 세는 내장 함수
# str(): 정수나 실수를 문자열 형태로 바꾸는 내장 함수
● Day 1 프로젝트
city_name = input("What's name of the city you grew up in?\n")
pet_name = input("What's your pet's name?\n")
print("Your Band Name: " + city_name + " " + pet_name)
[참고] Thonny
: 코드 실행순서에 따라 실행
URL : https://thonny.org/
Thonny, Python IDE for beginners
Thonny 4 is dedicated to Ukraine fighting the Russian invasion. 🇺🇦 Please support Ukraine! 🇺🇦 Download version 4.1.3 for • • For the curious: 4.1.4 Thonny Python IDE for beginners Features Easy to get started. Thonny comes with Pyth
thonny.org
'여러가지 > Python' 카테고리의 다른 글
Day 6 - 사용자 함수 정의(def), 함수 호출, while 반복문 (1) | 2023.12.08 |
---|---|
Day 5 - for 반복문, shuffle(리스트 섞는 함수) (2) | 2023.12.07 |
Day 4 - 모듈, Random, 리스트, 내장함수 .split(), index() (1) | 2023.12.07 |
Day 3 - 조건문 if, 관계연산자, 내장함수 count() (1) | 2023.12.01 |
Day 2 - 내장함수 type(), int(), float(), round(), 연산, f 문자열 (1) | 2023.11.29 |