Skip to content

Commit defa45d

Browse files
authored
Add files via upload
1 parent 22707fb commit defa45d

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

codes_in_Aug2025/avg_fnctn.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def greet():
2+
u = input("Enter user name: ")
3+
print(f"Hello {u}!\nWelcome to the program.")
4+
5+
greet() #calling the function greet to execute the code inside it

0 commit comments

Comments
 (0)