6 kyu

Simple Sum (with restrictions)

Description:

Task

You're given two non-negative numbers (0 <= x,y). The goal is to create a function named simple_sum which return their sum.

Restrictions

The restrictions can be summurized as 'bit and logical operations are allowed'.

Here comphrensive description. You're code mustn't contain:

1. `import`, `getattr`, `exec`, `eval`, `sum`  # with next point produce short solutions,
2. `int` class methods names                   # but here is another idea.
3. `__loader__`, `vars`, `__dict__`            # even more of them.
4. `if`, `in`, `is`                            # they start with `i` :)
5. `+`, `-`, `*`, `/`, `//`, `%`               # arithmetic operations
6. `==`, `!=`, `<`, `>`, `<=`, `>=`            # comparisions

Note

Inspired by suic's katas

Please assess the difficulty of the kata when you finish it :)

Puzzles
Restricted

More By Author:

Check out these other kata created by A.Freeman

Stats:

CreatedDec 10, 2016
PublishedDec 10, 2016
Warriors Trained561
Total Skips16
Total Code Submissions1086
Total Times Completed207
Python Completions207
Total Stars9
% of votes with a positive feedback rating90% of 73
Total "Very Satisfied" Votes61
Total "Somewhat Satisfied" Votes9
Total "Not Satisfied" Votes3
Total Rank Assessments6
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • A.Freeman Avatar
  • Bubbler Avatar
  • FArekkusu Avatar
  • saudiGuy Avatar
Ad