Comment faire la racine carré sur python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Comment faire la racine carré sur python

3rd Apr 2020, 5:31 PM
Arbi Allam
Arbi Allam - avatar
2 Answers
+ 1
import math number = int(input("enter a number:")) sqrt = math.sqrt(number) print("square root:" , sqrt)
3rd Apr 2020, 5:33 PM
BroFar
BroFar - avatar
+ 1
# or: number = int(input("enter e number: ")) sqrt = number**0.5 print("square root:",sqrt) # shorter and no import ;)
3rd Apr 2020, 5:46 PM
visph
visph - avatar