Skip to content

edvalin/python-playground

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

what the code does:

a simple calculator that performs addition, subtraction, multiplication and division

Pseudocode:

  1. create a dictionary with the options as keys and the functions as values
  2. create a while loop that runs until the user decides to stop
  3. ask the user to select an operation
  4. if the user selects a valid operation, ask the user to enter two numbers
  5. if the user selects an invalid operation, print an error message
  6. if the user selects a valid operation, perform the operation on the two numbers
  7. print the result
  8. ask the user if they want to perform another calculation
  9. if the user wants to perform another calculation, repeat steps 3-8
  10. if the user does not want to perform another calculation, exit the loop

How to start the app:

  1. open the terminal
  2. navigate to the directory that contains the app
  3. type python calculator.py and press enter

Run the tests using pytest

  1. open the terminal
  2. navigate to the directory that contains the app
  3. type pytest and press enter

python-playground

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors