- 1

Input 2 and output square of 2 how to make a programme

Print(2**2)

27th Jan 2020, 3:21 PM
Abdul Rahman
Abdul Rahman - avatar
4 Respuestas
+ 6
To the task you mentioned, you have to use input() function and assign the result of that to a variable. For doing output use the print() function, and an expression that calculates the square of the value stored in the variable from input.
27th Jan 2020, 3:27 PM
Lothar
Lothar - avatar
+ 4
Abdul, now put it in python code 😊. As you have started to go through the python tutorial, I suppose you will use python.
27th Jan 2020, 4:09 PM
Lothar
Lothar - avatar
0
Which programming language do you want to use?
27th Jan 2020, 3:24 PM
Peter Parker
Peter Parker - avatar
0
Input: Enter number:2 Output: Square of number 2 is 4
27th Jan 2020, 3:43 PM
Abdul Rahman
Abdul Rahman - avatar