Sha256: e93f1e835493af37c2d40db026225767c2ac4e35699fcd05c8c1107212c040cb

Contents?: true

Size: 1.56 KB

Versions: 21

Compression:

Stored size: 1.56 KB

Contents

# Wordy

Parse and evaluate simple math word problems returning the answer as an integer.

## Iteration 1 — Addition

Add two numbers together.

> What is 5 plus 13?

Evaluates to 18.

Handle large numbers and negative numbers.

## Iteration 2 — Subtraction, Multiplication and Division

Now, perform the other three operations.

> What is 7 minus 5?

2

> What is 6 multiplied by 4?

24

> What is 25 divided by 5?

5

## Iteration 3 — Multiple Operations

Handle a set of operations, in sequence.

Since these are verbal word problems, evaluate the expression from
left-to-right, _ignoring the typical order of operations._

> What is 5 plus 13 plus 6?

24

> What is 3 plus 2 multiplied by 3?

15  (i.e. not 9)

## Bonus — Exponentials

If you'd like, handle exponentials.

> What is 2 raised to the 5th power?

32

## Submitting Exercises

Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.

For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.

For more detailed information about running tests, code style and linting,
please see the [help page](http://exercism.io/languages/python).

## Source

Inspired by one of the generated questions in the Extreme Startup game. [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup)

## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
trackler-2.2.1.74 tracks/python/exercises/wordy/README.md
trackler-2.2.1.73 tracks/python/exercises/wordy/README.md
trackler-2.2.1.72 tracks/python/exercises/wordy/README.md
trackler-2.2.1.71 tracks/python/exercises/wordy/README.md
trackler-2.2.1.70 tracks/python/exercises/wordy/README.md
trackler-2.2.1.69 tracks/python/exercises/wordy/README.md
trackler-2.2.1.68 tracks/python/exercises/wordy/README.md
trackler-2.2.1.67 tracks/python/exercises/wordy/README.md
trackler-2.2.1.66 tracks/python/exercises/wordy/README.md
trackler-2.2.1.65 tracks/python/exercises/wordy/README.md
trackler-2.2.1.64 tracks/python/exercises/wordy/README.md
trackler-2.2.1.63 tracks/python/exercises/wordy/README.md
trackler-2.2.1.62 tracks/python/exercises/wordy/README.md
trackler-2.2.1.61 tracks/python/exercises/wordy/README.md
trackler-2.2.1.60 tracks/python/exercises/wordy/README.md
trackler-2.2.1.59 tracks/python/exercises/wordy/README.md
trackler-2.2.1.58 tracks/python/exercises/wordy/README.md
trackler-2.2.1.57 tracks/python/exercises/wordy/README.md
trackler-2.2.1.56 tracks/python/exercises/wordy/README.md
trackler-2.2.1.55 tracks/python/exercises/wordy/README.md