Program to create a library management system using a function

In this python function program, we will create a library management system using a function.

What is Function?
It is a block of code that executes when it is called.
To create a function use def keyword.

Steps to solve the program
  1. Create a function library.
  2. Use the def keyword to define the function.
  3. Pass two parameters i.e. book name and customers name.
  4. Print the book name and customer name.
  5. Pass the book name and customer name to the function while calling the function.
				
					def library(bname,cname):
    print("Book name: ",bname)
    print("Borrowed by :",cname)
library("Harry potter","Atharv")
				
			

Output :

				
					Book name:  Harry potter
Borrowed by : Atharv
				
			

Related Articles

program to reverse an integer.

add two Binary numbers.

Leave a Comment