Part 04-33 Test failed with correct awnser

Open
#22 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript
Domain
testing-qa

Research direction

Start with the exercise statement for everything_reversed and the displayed failing assertion. Compare the required new-list output with the assertion about preserving the original list; done means the project clarifies or corrects the contradiction and the test agrees with the documented behavior.

Written by the indexing model from the issue text.

Description

This is the title:

Please write a function named everything_reversed, which takes a list of strings as its argument. The function returns a new list with all of the items on the original list reversed. Also the order of items should be reversed on the new list.

An example of how the function should work:

my_list = ["Hi", "there", "example", "one more"]
new_list = everything_reversed(my_list)
print(new_list)
Sample output
['erom eno', 'elpmaxe', 'ereht', 'iH']

This is my output:
['erom eno', 'elpmaxe', 'ereht', 'iH']

This is the failed test that has a contradiction with the exercise title:

  • ['ereh', 'si', 'a', 'elttil', 'regnol', 'tsil', 'htiw', 'erom', 'sdrow']
  • ['here', 'is', 'a', 'little', 'longer', 'list', 'with', 'more', 'words'] : Function should not change the original list. The list should be ['here', 'is', 'a', 'little', 'longer', 'list', 'with', 'more', 'words'] but it is ['ereh', 'si', 'a', 'elttil', 'regnol', 'tsil', 'htiw', 'erom', 'sdrow'].

I don't know if I am wrong in some way but I am not able to see it, i would love to clarify this.

Thanks in advance.

Dominant language
JavaScript
Stars
77
Forks
30
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rage/programming-26

All issues in rage/programming-26

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.