Take a 2 digit number as input from the user. Find the square of it, identify the resulting 3 digit number which has its 2 digits at the rightmost position similar to the original digits
Example: input: AB
AB*AB = CAB for some C
using python programming
Answers
Answered by
1
Code:
#asks for the number and sets the number variable as ans(string)
number=input("Write Your Number")
#converts the string number into float and then calculates the square
ans=float(number)*float(number)
#converts the float to an integer if possible
if(ans.is_integer()):
ans=int(ans)
print(ans)#write the ans
Explanation:
given in code
Similar questions