Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions BeginnersFriendlyRepositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ If you know any good repository for beginners, feel free to add it to this table
| OpenSauce | [Link](https://github.com/TechnoBlogger14o3/OpenSauce) | Multiple Languages, DSA, Algorithms |
| Awesome Lists | [Link](https://github.com/sindresorhus/awesome) | Markdown, Documentation |
| 30 Seconds of Code | [Link](https://github.com/30-seconds/30-seconds-of-code) | JavaScript, TypeScript, Python |
| Exercism | [Link](https://github.com/exercism/exercism) | Ruby, JavaScript, Multiple Languages |
| TheAlgorithms | [Link](https://github.com/TheAlgorithms) | Multiple Languages, Algorithms |
| TensorFlow Examples | [Link](https://github.com/tensorflow/examples) | Python, Machine Learning |
| Open Source Game Development | [Link](https://github.com/godotengine/godot) | C++, GDScript |



Expand Down
11 changes: 11 additions & 0 deletions first_last_digit.py/first last
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def swap_first_last(num):
last = num % 10
n = num
pow10 = 1
while n >= 10:
n //= 10
pow10 *= 10
first = n
middle = (num % pow10) // 10
result = last * pow10 + middle * 10 + first
return result