Reversing A String In Python Language Or Python 3 Get link Facebook X Pinterest Email Other Apps - September 02, 2020 #Stringrev.py#Here we Use The Indexes in reversing a string and the code will be:def reverse(a): return (a[::-1])print(reverse("Your String"))# Here I used A function To Make It Easy Get link Facebook X Pinterest Email Other Apps Comments
CALCULATING FACTORIALS IN PYTHON LANGUAGE - August 22, 2020 n = int ( input ( " Enter Here You Want to calculate the factorial: " )) x = 1 for i in range ( 1 , n + 1 ): x *= i print ( x ) """ FACTORIAL EXAMPLE: 1! = 1 2! = 2*1 = 2 3! = 3*2*1 = 6 4! = 4*3*2*1 = 24 5! = 5*4*3*2*1 = 120 """ Read more
Comments
Post a Comment