MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / division

Function division

projects/Calculator/main.py:35–44  ·  view source on GitHub ↗

Function divide two numbers

()

Source from the content-addressed store, hash-verified

33
34
35def division():
36 """Function divide two numbers"""
37 n1 = float(input("Enter first number: "))
38 n2 = float(input("Enter second number: "))
39 if n2 == 0:
40 print("Invalid entry")
41 return "Invalid entry"
42 print(n1 / n2)
43
44 return n1 / n2
45
46
47def average():

Callers 1

main.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected