DART(3)
-
Dictionary 클래스 python 및 dart 구현
Problem) 아래 테스트 코드를 패스할 Dictionary 클래스를 만들기! from class_dict import Dictionary def test_dictionary(): # Create a new instance of Dictionary dictionary = Dictionary() # Test add and get methods dictionary.add('apple', 'A fruit that grows on trees.') assert dictionary.get('apple') == 'A fruit that grows on trees.' # Test showAll and count methods dictionary.add('banana', 'A long curved fruit.') di..
2023.07.15 -
파이썬 개발자의 플러터 개발환경셋업 (MacOS, VSCode)
brew install --cask flutter # 플러터 및 다트 설치 flutter doctor flutter create tiktok_clone ''' VSCode Extension - dart - flutter VSCode setting - Dart: Preview Flutter Ui Guides - Dart: Preview Flutter Ui Guides Custom Tracking - Dart: Preview Hot Reload on Save Watvcher ''' Reference https://nomadcoders.co/flutter-for-beginners Flutter 로 웹툰 앱 만들기 – 노마드 코더 Nomad Coders Flutter for Beginners nomadcoder..
2023.06.26 -
Dart 시작하기 1. 변수 (Variables)
파이썬부터 시작한 나로서는 "void main() {}"구문이 꼭 있어야 코드를 실행할 수 있어야 한다는 점이 낯설었다. 굳이 파이썬에서 비슷한 구문을 찾으라면 "if __name__ == '__main__':"일 것이지만, 사실 파이썬에서는 이 구문 안써도 코드가 실행된다. 그리고 유의할 점은 코드마다 ';'(세미콜론)을 안쓰면 에러 뜬다. 주석을 쓰려면 Dart는 '//'를 쓰고, Python은 '#'을 쓴다. # Dart void main() { print('hello'); } # Python if __name__ == '__main__': print('hello') 본격적으로 Dart로 변수를 선언해보자. 파이썬과 다르게 변수명만으로 선언되지 않는다. 자료형(type)을 앞에 선언해줘야 하는데, ..
2023.02.04