Comment faire la racine carré sur python | Sololearn: Learn to code for FREE!
Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję
0

Comment faire la racine carré sur python

3rd Apr 2020, 5:31 PM
Arbi Allam
Arbi Allam - avatar
2 odpowiedzi
+ 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