티스토리 뷰
Steve Jobs in 1994: The Rolling Stone Interview
Even at one of the low points in his career, Jobs still had confidence in the limitless potential of personal computing
www.rollingstone.com
* 객체 지향 프로그래밍
- 가진것(has) > 속성(attributes)
- 하는것(does) > 메소드(methods)
- 속성과 메서드를 청사진화 > Class
- Class를 통해 만든 Object
----
import another_module
print(another_module.another_variable)
# import turtle
# timmy = turtle.Turtle()
from turtle import Turtle, Screen #turtle:모듈 Turtle:클래스
timmy = Turtle() #timmy:오브젝트
print(timmy)
--> <turtle.Turtle object at 0x000001B8E12853F0> object가 메모리에 저장(print)
* Object Attributes
object | Attribute
ex) car.speed
my_screen = Screen()
print(my_screen.canvheight)
* Object Methods #method : object에 묶인 함수?
object | Method
ex) car.stop()
my_screen.exitonclick()
timmy.shape("turtle") #timmy의 모양을 turtle로 변경
https://docs.python.org/3/library/turtle.html
turtle — Turtle graphics — Python 3.10.2 documentation
turtle — Turtle graphics Source code: Lib/turtle.py Introduction Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzeig, Seymour Papert and Cynthia Solomon i
docs.python.org
timmy.color("Orange")
my_screen = Screen()
print(my_screen.canvheight)
timmy.forward(100)
import 한 모듈의 class에서 object를 생성
from prettytable import PrettyTable # import class 'PrettyTable' from module 'prettytable'
table = PrettyTable() # crate an object 'table' from class 'PrettyTable()'
table.add_column("Pokemon Name",["Pikachu","Squirtle","Charmander"])
table.add_column("Type",["Eletric","Water","Fire"])
print(table)
print(table.align)
table.align ="r"
print(table)
print(table.align)
'Test > Python(20220101~)' 카테고리의 다른 글
OOP_Coffee Machine (0) | 2022.02.12 |
---|---|
** Find, install and publish Python packages with the Python Package Index (0) | 2022.02.12 |
Days15_Coffee Machine (0) | 2022.01.30 |
Days15 부터는 중급이래... 후덜.. (0) | 2022.01.22 |
Days14_숫자 업다운 게임 프로젝트 (리스트/딕셔너리 중첩 호출) (0) | 2022.01.22 |
- Total
- Today
- Yesterday
- 3par
- insert
- exadata
- 스토리지
- oracle
- fromkeys
- 부동없이
- 배열
- 읽어오기
- Join
- LIST
- 대소문자
- set()
- 중복제거
- dp-2
- powercli
- 차집합
- sysprep
- vmware.powercli
- EXA
- virt-sysprep
- artandculture
- dezoomify
- storage
- powershell
- 변수화
- 정렬
- vmware
- dp-1
- cloud-init
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |