We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d8870b commit 92bb905Copy full SHA for 92bb905
1 file changed
May21/functions/basics.py
@@ -10,7 +10,37 @@ def say_hello():
10
"""
11
print("hello")
12
13
+def pi():
14
+ """
15
+ This function returns the pi value
16
17
+ return 3.14
18
+
19
+def square(number):
20
21
+ This function returns the square of number
22
23
+ paramters:
24
+ number:
25
26
+ returns:
27
+ square of number
28
29
+ return number ** 2
30
31
+def power(number, index):
32
33
+ This function can calculate the power
34
35
+ return number ** index
36
37
+# calling function
38
say_hello()
39
do_nothing()
40
41
+# Getting a return value from function
42
+pi_value = pi()
43
+print(pi_value)
44
+print(square(10))
45
+print(power(10,4))
46
0 commit comments