본문 바로가기

파이썬12

Mini -Project #2-3 GUI 계산기 만들기(pyside6) - 완료 일반적인 기능 완료 추가기능 1. MR,MS,MC, 적용 2. BS(back space) 기능 추가 3. 숫자 display text 크기 증가(알아보기 쉽게) 다음 예정 1. 주석 추가(이해, 분석등 내용 추가) import sys from PySide6 import QtCore, QtGui from PySide6.QtWidgets import QApplication, QMainWindow, QLineEdit, QPushButton, QHBoxLayout, QVBoxLayout, QWidget, QGridLayout, QLabel from PySide6.QtCore import Slot, Qt import re result = '' result_state = False count = 0 MS_numbe.. 2023. 2. 13.
[Study Python] dictionary A dictionary in Python is an unordered collection of key-value pairs, where each key maps to a value. The keys must be unique and immutable (i.e., they cannot be changed), while the values can be of any type and can be changed. Dictionaries are implemented as hash tables, making lookups and updates efficient and fast. They are defined using curly braces {} and each key-value pair is separated by.. 2023. 2. 11.
Mini -Project #2-2 GUI 계산기 만들기(pyside6) - 개선 구현기능 1. 숫자입력 후 계산시 입력하고 = 입력하면 계산되어 표시됨 2. AC 입력시 화면이 지워짐 3. 사칙연산이 가능함 4. 계산후 다시 숫자 입력시 화면 지워지면서 숫자 입력되게(함수 수정) 5. 오류 검출(if function except 추가) 6. 코드 좀더 간소화(모르는 함수 공부해서)(dict. 활용) 차후 추가 기능 1. 백스페이스 기능 추가 2. 텍스트창 입력시 복사 되게 3. mr,mc 기능 추가 4. 진법 계산기 기능 추가 5. code 공부 detail하게 해서 주석 추가 import sys from PySide6 import QtCore, QtGui from PySide6.QtWidgets import QApplication, QMainWindow, QLineEdit, QPu.. 2023. 2. 10.
[Study] Python, eval,lamda,map 공부하다가 몰라서 정리 1. eval(쉽게 이야기 하면 문자나 숫자로 구성된 문자를 파이션 표현식으로 바꾼다(산술식) 하지만 사용하기 매우 조심해야 한다. eval is a built-in function in Python that evaluates a string as a Python expression. The expression can be a simple value, such as a string or a number, or a more complex expression, such as an arithmetic expression. For example, the following code will evaluate the string "2 + 3" as a Python expression and p.. 2023. 2. 1.