1. Welcome!
Python is an easy to learn programming language. You can use it to create web apps, games, even a search engine!
(파이썬은 배우기 쉬운 프로그래밍 언어입니다. 당신은 이것으로 웹 앱, 게임, 심지어 검색 엔진까지 만들수 있습니다.)
2. Variables
Creating web apps, games, and search engines all involve storing and working with different types of data. They do so using variables. A variable stores a piece of data, and gives it a specific name.
1 2 |
# Write your code below! my_variable = 10 |
3. Booleans
A boolean is like a light switch. It can only have two values. Just like a light switch can only be on or off, a boolean can only be True
or False
.
1 2 3 4 5 |
# Set the variables to the values listed in the instructions! my_int = 7 my_float = 1.23 my_bool = True |
4. You’ve Been Reassigned
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# my_int is set to 7 below. What do you think # will happen if we reset it to 3 and print the result? my_int = 7 # Change the value of my_int to 3 on line 8! my_int = 3 # Here's some code that will print my_int to the console: # The print keyword will be covered in detail soon! print my_int |
출처 : http://www.codecademy.com Python 강의