Hi! So for my homework assignment, we have to reverse a four digit number.
Thanks in advance!
# Python Class 2402 # Lesson 2 Problem 6 # Author: KitKatKarateIlluminati (491160) FourDigit = int(input("Please enter a four digit number: ")) First = FourDigit % 10 Second = ((FourDigit % 100) - First)/10 Third = (FourDigit - (Second * 10 + First))/100 Fourth = (FourDigit - (First + Second * 10 + Third * 100))/1000 Reverse = Fourth + Third * 10 + Second * 100 + First * 1000 print(Reverse)Can you guys please tell me why this is wrong?
Thanks in advance!
