PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'''
Challenge
Raise a number to the square using only:
- While or for
- Operators + - (NOT MULTIPLICATION *)
Terms
* Do not use modules or libraries that give the value squared
* You can use the language you want ;
'''
number=int(input());result=0
for i in range (number):
result+=number
print('The square of',number,'is',result)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run