We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22707fb commit defa45dCopy full SHA for defa45d
2 files changed
codes_in_Aug2025/avg_fnctn.py
@@ -0,0 +1,8 @@
1
+def avg(): #it defined a function named avg to calculate the average of three numbers having x, y and z as variable inputs
2
+ x = int(input("Enter first number: "))
3
+ y = int(input("Enter second number: "))
4
+ z = int(input("Enter third number: "))
5
+ average = (x + y + z) / 3
6
+ print("The average of the three numbers is:", average)
7
+
8
+avg() #calling the function avg to execute the code inside it
codes_in_Aug2025/greet_fnct.py
@@ -0,0 +1,5 @@
+def greet():
+ u = input("Enter user name: ")
+ print(f"Hello {u}!\nWelcome to the program.")
+greet() #calling the function greet to execute the code inside it
0 commit comments