We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e84dd26 commit a40cfb9Copy full SHA for a40cfb9
exercises/11-Swap_digits/app.py
@@ -1,14 +1,7 @@
1
#Complete the fuction to return the swapped digits of a given two-digit-interger.
2
def swap_digits(num):
3
# Your code here
4
- num = str(num)
5
- s = ""
6
- first_value = num[0]
7
- second_value = num[1]
8
- s+=second_value
9
- s+=first_value
10
- return s
11
12
13
#Invoke the function with any two digit interger as its argument
14
-print(swap_digits(30))
+print(swap_digits(30))
0 commit comments