Code Monkey home page Code Monkey logo

swe_teamproject's Introduction

간단한 CUI 계산기

사용자가 입력한 계산식을 처리하고 결과를 출력하는 간단한 CUI 기반 계산기입니다.
사용자는 키보드의 (+), (-), (*), (!)를 이용하여 더하기, 빼기, 곱하기, 팩토리얼 연산을 수행할 수 있습니다.
한 번의 입력에는 한 종류의 연산만 가능하며, 사용자가 '='를 입력하면 최종 결과가 출력됩니다.
단 팩토리얼의 경우 '!'를 입력하면 결과를 바로 출력합니다.
이 외의 입력이 들어온 경우 에러 메시지를 출력합니다.

개발환경

  • python 3.x

예시

15
-
3
-
10
= 
2

지원 연산

  • 더하기 (+)

      addition_function(expression : str) -> int
    
  • 빼기 (-)

      subtraction_function(expression)
    
  • 곱하기 (*)

      multiplication_function(expression: str) -> int
    
  • 팩토리얼 (!)

      factorial(expression: str) -> int
    

제한 사항

  • 피연산자는 정수만 가능합니다.
  • 한 종류의 연산만 가능합니다.

이스터에그

만약 사용자가 특정 숫자를 입력하면 이스터에그 함수를 호출하여 특별한 메시지를 출력합니다.

easterEgg_function(variable)

계산식 유효성 검사

계산식이 유효한지 확인하기 위해 다음의 함수를 수행합니다.

is_valid_expression(expression : str, user_input : str) -> bool

swe_teamproject's People

Contributors

deokjong avatar jeongwoo1998 avatar iju42829 avatar nicknaek avatar haezeong avatar pachelbel29 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.