Status: Started
Objective
Write a function that will remove the final letter in a word if it is 'e', but only if the second to last letter is also an 'e'. If the final letter or second to last lettter are not 'e's, return the string as is.
Example:
```
pleasee returns please
exci
- scratchpad.py
- Unit Test
Font Size
14
Parentheses autocomplete
Wrap lines
Editor
Theme
Code with blocks by default
Console Font Size
12
Console Theme
Display Server Graphics Screen
Show File Tab Bar
Debug Mode
Remove Final E
Unit Test
1
2
def remove_last_e(str):
pass
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output
Grading
Docs
Exercise
More
History
Video
Download
About
W
Test Cases
x/x
Pass | Test | Message | |
---|---|---|---|
- | Test results will show here. | - |
Errors:
This student is viewing this assignment in English. View this page in English?
5 points
Write a function that will remove the final letter in a word if it is ‘e’, but only if the second to last letter is also an ‘e’. If the final letter or second to last lettter are not ‘e’s, return the string as is.
Example:
pleasee returns please
excite returns excite
computer returns computer
Reset Code
Upload an image
Upload from your computer
Or paste a link here
Slides and Notes
No slides available for this video
About
Python 3 Practice
3.11.9 (default, Apr 6 2024, 17:59:24)
[GCC 6.4.0]