깃 허브 블로그 시작

less than 1 minute read

깃 허브 블로그 시작

요즘 자동화 프로그램에 관심이 생겨서 파이썬 공부를 하고 있다.
조코딩(JoCoding)님의 유튜브를 보면서 파이썬 기초에 관해 공부하고 있는데, C와 C++을 공부했었고 어느 정도 다룰 줄 알아서 그런지 내용이해에 어려움을 느끼지는 않는다.
for문과 같이 사용법이 조금씩 다른 함수들은 차차 사용하면서 익숙해지면 될 것 같다.

● Python의 Class를 활용한 계산기 제작 코드

class FourCal:
    def __init__(self,first, second):
        self.first = first
        self.second = second
    def setdata(self, first, second):
        self.first = first
        self.second = second
    def add(self):
        result = self.first + self.second
        return result
    def div(self):
        result = self.first / self.second
        return result

class MoreFourCal(FourCal):
    def pow(self):
        result = self.first ** self.second
        return result
    def div(self):
        if self.second == 0:
            return 0
        else:
            return self.first / self. second

a = MoreFourCal(4,2)
b = MoreFourCal(4,0)
print(a.pow())
print(b.div())

오늘 한 일

● github 블로그 시작 작년에 팀 프로젝트를 할 때 github를 써봤는데 매우 편리해서 흥미가 생겼었는데 이번 기회를 통해 github에 대해서 제대로 공부해 볼 생각이다.
● Python의 Class
개념 자체는 C++과 다르지 않아서 쉬웠지만, 값을 받아올 때 init을 사용하는 점과 self의 사용은 처음 보는 것이었고 흥미로웠다.
● 주식 계좌 개설
주식 자동 매매 프로그램을 만들기 위해서 새로운 계좌를 하나 개설했다.

Leave a comment