Define a function called "Division" with two parameters and return type float, which divides the first parameter with the second | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Define a function called "Division" with two parameters and return type float, which divides the first parameter with the second

parameters

10th May 2018, 7:17 AM
Mwesigwa Jovan Jonathans
Mwesigwa Jovan Jonathans - avatar
2 Réponses
+ 1
You know what is a function? Know how define it?
10th May 2018, 8:49 AM
KrOW
KrOW - avatar
+ 1
With Python: # function def Division(a, b): if b == 0: return "division by Zero error" return a / b # tests y = Division(1, 7) print(y) print(Division(6, 4)) print(Division(6, 0)) print(Division(0, 4))
10th May 2018, 9:35 AM
Paul
Paul - avatar