-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathday4.py
More file actions
51 lines (30 loc) · 1.21 KB
/
day4.py
File metadata and controls
51 lines (30 loc) · 1.21 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""Certainly! Python functions are blocks of code that perform a specific task and can be reused throughout your program. Here's the basic syntax of defining and using a Python function"""
# Void function
# def greet():
# print("good morning mumbai ")
# greet()
# -------------------------with parameter -----------------
# def add(num1,num2):
# print("the addition of two number is : ",num1+num2)
# add(50,60)
# parameter value from user on runtime
# num1=int(input("Enter 1st number : "))
# num2=int(input("Enter 2nd number : "))
# def add(value1,value2):
# print("the addition of two number is : ",value1+value2)
# add(num1,num2)
# ---------------------------------------with return value --------------------
# def add():
# num1=int(input("Enter 1st number : "))
# num2=int(input("Enter 2nd number : "))
# return num1+num2
# x=add()
# print(x)
# --------------------------with parameter and with return value ------------------
def gst_cal(product,price):
percent=5
gst=price*percent/100
res=gst+price
print(" your product name is : " ,product)
return res
print("Your final price is : ",gst_cal("samosa",60))