0

Help me to make program for this using python.

Input_value = 123 Input_count = 3 Output is : 321 123 321 ( I need to reverse input number by input count) If input _count = 5 Output : 321 123 321 123 321

28th Apr 2020, 11:22 AM
Pathum Bandara
Pathum Bandara - avatar
2 ответов
+ 4
a = input("enter the no : ") b = int(input("how many times : ")) if b%2 == 0: k=int(b/2) else : k=(b//2) + 1 for i in range (k): print(a) for k in range(1): print (a[::-1]) Try this
28th Apr 2020, 11:48 AM
Ayush Kumar
Ayush Kumar - avatar
0
One of the inputs is a count. That'll mean you use a for loop in range of the count. Each time the numbers are made to equal the reverse order, they are printed. Think about how you would do that, give it a shot, and post your code
28th Apr 2020, 11:39 AM
Slick
Slick - avatar