Python program to find the square of a number which is entered by user | Python Coding Hub
1. Open your Python IDLE
2. Copy code given below
3. Now run
# taking name of the user using input method name= input('Enter Your Name Here :') # taking favourite number from the user num=int(input('Enter Your Favourite Number :')) # calculate the square of the number square=num*num # greeting with the username print('Hello',name) print ('Welcome to Python Programming ') # printing favourite number of the user print('Your Favourite Number is',num) # output of the square of the favourite number of the user print('Square of Your Favourite Number','(',num,')','is','=',square)Happy Coding
0 Comments
Do not comment any spam link in comment box...