https://github.com/rogerisk/python-text-regex
Python tasks that concentrate on understanding regex text searcher and work with text overall
https://github.com/rogerisk/python-text-regex
Last synced: about 1 year ago
JSON representation
Python tasks that concentrate on understanding regex text searcher and work with text overall
- Host: GitHub
- URL: https://github.com/rogerisk/python-text-regex
- Owner: RogerIsk
- Created: 2024-06-14T14:51:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-14T15:25:36.000Z (about 2 years ago)
- Last Synced: 2025-03-09T12:56:50.211Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README - 2.md
Awesome Lists containing this project
README
# make happy
## Task
Make any face happy. Create a function that takes a sentence containing sad faces and turn them into happy ones! This involves changing only the mouths.
Make sure to only change the face if there are eyes before them, round(3.4) wouldn't become round)3.4) (for example).
## Examples:
Sad face examples: :( 8( x( ;(
Happy face examples: :) 8) x) ;)
## Input / Output
```
make_happy("My current mood: :(") --> "My current mood: :)"
make_happy("I was hungry 8(") --> "I was hungry 8)"
make_happy("print('x(')") --> "print('x)')"