From 1732ba3872cf8ea15cc5d3ba7353a12b914fff2d Mon Sep 17 00:00:00 2001 From: amangagan hora Date: Sun, 18 Oct 2020 18:09:32 +0530 Subject: [PATCH 1/3] added a new python file --- find total bill 1.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 find total bill 1.py diff --git a/find total bill 1.py b/find total bill 1.py new file mode 100644 index 0000000..ffa0a00 --- /dev/null +++ b/find total bill 1.py @@ -0,0 +1,9 @@ +#aim to find the liberary charges +d=int(input("enter the days-")) +if d<=5 : + f=d*40 +elif d<=10 : + f=200+(d-5)*65 +else: + f=200+325+(d-10)*80 +print("total cost is",f) From 751a1728caffbc9b374f80830fca2336f161c465 Mon Sep 17 00:00:00 2001 From: amangagan hora Date: Wed, 21 Oct 2020 16:03:02 +0530 Subject: [PATCH 2/3] To find hours and minutes with the inputed seconds --- to find hours and minutes.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 to find hours and minutes.py diff --git a/to find hours and minutes.py b/to find hours and minutes.py new file mode 100644 index 0000000..b76b9cd --- /dev/null +++ b/to find hours and minutes.py @@ -0,0 +1,6 @@ +#aim=to find the hours and minutes os the seconds inputed +ts=float(input("enter the seconds->")) +hr=ts//3600 +mins=(ts%3600)//60 +sec=(ts%3600)%60 +print(ts,"seconds= ",hr,"hours",mins,"minutes",sec,"seconds") From 5e6793db8f4d0dcfe99c99059bce45fc7cb73083 Mon Sep 17 00:00:00 2001 From: amangagan hora Date: Thu, 22 Oct 2020 12:00:18 +0530 Subject: [PATCH 3/3] Program with the help of created module --- Python program with the help of module.py | 49 +++++++++++++++++++++++ to find hours and minutes.py | 6 --- 2 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 Python program with the help of module.py delete mode 100644 to find hours and minutes.py diff --git a/Python program with the help of module.py b/Python program with the help of module.py new file mode 100644 index 0000000..15c13cd --- /dev/null +++ b/Python program with the help of module.py @@ -0,0 +1,49 @@ +import circle +import rectangle +import square +import triangle +print('\t\t\tmenu') +print('1. area of circle') +print('2. circumference of circle') +print('3. area of rectangle') +print('4. perimeter of rectangle') +print('5. area of square') +print('6. perimeter of square') +print('7. area of triangle') +print('8. perimeter of triangle') +print('9. quit') +choice=int(input('enter your choice-')) +if choice==1: + radius=int(input('enter the radius-')) + print('the area is',circle.area(radius)) +elif choice==2: + radius=int(input('enter the radius-')) + print('the circumference is',circle.circumference(radius)) +elif choice==3: + width=int(input('enter the width-')) + length=int(input('enter the length-')) + print('the area is',rectangle.area(width,length)) +elif choice==4: + width=int(input('enter the width-')) + length=int(input('enter the length-')) + print('the perimeter is',rectangle.perimeter(width,length)) +elif choice==5: + side=int(input('enter the side of square-')) + print('the area of square is',square.area(side)) +elif choice==6: + side=int(input('enter the side of square-')) + print('the perimeter of square is',square.perimeter(side)) +elif choice==7: + a=int(input('enter the side of triangle-')) + b=int(input('enter the side of triangle-')) + c=int(input('enter the side of triangle-')) + print('the area of triangle is',triangle.area(a,b,c)) +elif choice==8: + a=int(input('enter the side of triangle-')) + b=int(input('enter the side of triangle-')) + c=int(input('enter the side of triangle-')) + print('the perimeter of triangle is',triangle.perimeter(a,b,c)) +elif choice==9: + print('quit') +else: + ('invalid selection') diff --git a/to find hours and minutes.py b/to find hours and minutes.py deleted file mode 100644 index b76b9cd..0000000 --- a/to find hours and minutes.py +++ /dev/null @@ -1,6 +0,0 @@ -#aim=to find the hours and minutes os the seconds inputed -ts=float(input("enter the seconds->")) -hr=ts//3600 -mins=(ts%3600)//60 -sec=(ts%3600)%60 -print(ts,"seconds= ",hr,"hours",mins,"minutes",sec,"seconds")