What I learnt Today
- I was to do a a mini project on reversing a string.
- Later track , commit and push the mini-project to my public github repo python-concepts.
About the Project
- I was to allow a user to enter their own string and store that string in a variable.
- Reverse a string either through a loop or slicing.
- Output the input of the user and the reversed string.
Challenges I faced
- During reversing I didn't know how will I will indicate the ending index. I had learnt you have to specify the starting and ending index. For the starting i knew it was negative 1(-1) as we are reversing.
How I solved the challenge
1.I had to use ai (chat-gpt) and inquire how to about that.
2.Learnt that I technically don't need to specify the starting and ending index.
3.How to go about this use two semicolon and the index negative one. Example: [:: -1]
See Example Below in Action:
Resources I used
1.Refresher python series by Bonaventure Ogeto on youtube.
2.Chat-gpt for explaining the challenge I was facing.
3.Git-Hub where I have my python scripts pushed to the public git-hub repository python-concepts.
What's Next
I'll be doing a project on building a simple calculator app.
Top comments (0)