forked from ronitraj74/python-Learning-code
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path08_chapter.py
More file actions
36 lines (36 loc) · 1.06 KB
/
08_chapter.py
File metadata and controls
36 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'''
name = input("Enter your name here : ")
def goodday(name,ending):
print("hiiiii, good morning " + name)
print(ending)
return "done"
output = goodday(name, "Thank you")
print(output)
'''
#-----------------------average of three number -------------------------------
'''
def average(ending):
a = int(input("Enter the first number : "))
b = int(input("Enetr the second number : "))
c = int(input("Enter the third number : "))
print((a+b+c)/3)
print(ending)
average("Thank you")
average("Thank you")
'''
#-----------------------default parmeter value----------------------------------
'''
# def goodDay(name,ending = "Thanks"):
# print(f"Hiiiiiiiiiiii {name}")
# print(ending)
# goodDay("Ronit","Thank you")
'''
#-----------------------Recursion----------------------------------------------
'''
n = int(input("Enter the number to find factorial : "))
def factorial(n):
if(n==1 or n==0):
return 1
return n * factorial(n-1)
print(f"the factorial of the given number is: {factorial(n)}")
'''