File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change 22
33## 📝 Instructions:
44
5- 1 . Given a two-digit integer, swap its digits and print the result.
5+ 1 . Create a function named ` swap_digits() ` given a two-digit integer, swap its digits and print the result.
66
7- ### Example input:
7+ ## Example input:
88
9- + 79
9+ ``` py
10+ swap_digits(79 )
11+ ```
1012
11- + 30
13+ ## Example output:
1214
13- ### Example output:
14-
15- + 97
16-
17- + 3
15+ ```
16+ 97
17+ ```
1818
1919## 💡 Hint:
2020
21- + If you don't know how to start solving this assignment, please, review a theory for this lesson:
22- https://snakify.org/lessons/integer_float_numbers/
21+ + If you don't know how to start solving this assignment, please, review a theory for this lesson: https://snakify.org/lessons/integer_float_numbers/
2322
24- + You may also try step-by-step theory chunks:
25- https://snakify.org/lessons/integer_float_numbers/steps/1/
23+ + You can also try step-by-step with theory chunks: https://snakify.org/lessons/integer_float_numbers/steps/1/
2624
27- + Note that you need to concatenate two numbers, so in order not to add those values you may have to convert them as a string ( str)
25+ + Note that you need to concatenate two numbers, so you may have to convert them into a string ` str(number) ` .
2826
29- + The function must return a number
27+ + The function must return a number.
You can’t perform that action at this time.
0 commit comments