0
How can you take input and transfer that into a function to obtain the result of a calculation?
For example: How do you get the age of an indivual through input and then subtract a predetemined amount from that to obtain a result? Do you require a function?
2 Antworten
+ 1
a=int(input())
func age(a):
b=a-something
return b
print(age(a))
well function makes the code reusable anywhere ,you can achieve it without function as well
a=int(input())
b=a-something
Print(b)
- 2
Where is your try . We can help in your problems but dont think that we will provide you code. This is a self learning platform