Question-164: What would happen, when you run below program
def totalSalary(salary,hike, bonus=10000):
total=salary + (salary *hike)/100 + bonus
return total
print("!!!!Done with total Salary calculation")
def tax(x):
tax=x*30/100
return tax
x=80000
y=10
z=10000
totalSalary=totalSalary(x, y, z)
your_tax = tax(totalSalary)
- This would give error
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Answer: D
Exp:
Defining more than one function
#Defining a function with three parameters def totalSalary(salary,hike, bonus=10000): total=salary + (salary *hike)/100 + bonus return total #Below line never be reached. print("!!!!Done with total Salary calculation")
#another function to calculate tax on total salary def tax(x): tax=x*30/100 return tax
i=0 You can access to full explanation to question and answer from this page. |