faisaltop10

proxy 24.6.2021

Jun 24th, 2021 (edited)
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.86 KB | None | 0 0
  1. # Program make a simple calculator
  2.  
  3. # This function adds two numbers
  4. def add(x, y):
  5. return x + y
  6.  
  7. # This function subtracts two numbers
  8. def subtract(x, y):
  9. return x - y
  10.  
  11. # This function multiplies two numbers
  12. def multiply(x, y):
  13. return x * y
  14.  
  15. # This function divides two numbers
  16. def divide(x, y):
  17. return x / y
  18.  
  19.  
  20. print("Select operation.")
  21. print("1.Add")
  22. print("2.Subtract")
  23. print("3.Multiply")
  24. print("4.Divide")
  25.  
  26. while True:
  27. # Take input from the user
  28. choice = input("Enter choice(1/2/3/4): ")
  29.  
  30. # Check if choice is one of the four options
  31. if choice in ('1', '2', '3', '4'):
  32. num1 = float(input("Enter first number: "))
  33. num2 = float(input("Enter second number: "))
  34.  
  35. if choice == '1':
  36. print(num1, "+", num2, "=", add(num1, num2))
  37.  
  38. elif choice == '2':
  39. print(num1, "-", num2, "=", subtract(num1, num2))
  40.  
  41. elif choice == '3':
  42. print(num1, "*", num2, "=", multiply(num1, num2))
  43.  
  44. elif choice == '4':
  45. print(num1, "/", num2, "=", divide(num1, num2))
  46. break
  47. else:
  48. print("Invalid Input")
  49.  
  50.  
  51. http://www.bakingandmistaking.com/2011/10/jammers-giant-streusel-jam-cookies.html?showComment=1624380207352#c7993899181098979534
  52.  
  53. http://www.fireonthehead.com/2014/07/hollister-lookbook.html?showComment=1624380449072#c6097676242358255928
  54.  
  55. http://www.greenexplored.com/2014/03/kior-now-at-64-cents.html?showComment=1624380849467#c7438950394244583645
  56.  
  57. http://www.sinlung.com/2015/08/several-houses-swept-away-in-mudslide.html?showComment=1600640435387#c5599901185019461541
  58.  
  59. http://www.fireonthehead.com/2020/03/no-where-to-go.html?showComment=1624381088061#c6891519227013457126
  60.  
  61. http://internetmarketing.inet.vn/2012/12/khoa-internet-marketing-ac-biet-giai-ma.html?showComment=1624381170152#c5179749230104001467
  62.  
  63. http://labsi-blog.trunojoyo.ac.id/2010/08/warga-labsi-buka-bersama.html?showComment=1624381206439#c4131216780214134776
  64.  
  65. https://blog.packersmoversbangalore.in/2017/04/consider-best-packers-and-movers.html
  66.  
  67. https://www.kfddesigns.com/2010/08/breakfast-nook-do-over.html?showComment=1615039665885#c1404894404467274187
  68.  
  69. https://www.blogger.com/comment.g?blogID=853575090547965692&postID=2826617735789005369&page=1&token=1624381450164
  70.  
  71.  
  72. https://www.blogger.com/comment.g?blogID=10731490&postID=114667492705246838&page=1&token=1624543359929&isPopup=true
  73.  
  74. https://www.blogger.com/comment.g?blogID=6659421964308885866&postID=4278482552865279726&page=9&token=1624543735381&isPopup=true
  75.  
  76. http://family.blog.hofstra.edu/2019/11/why-college-really-can-be-best-4-years.html?showComment=1624543817681#c5682399774070020952
  77.  
  78.  
  79. https://www.blogger.com/comment.g?blogID=3854472437184520211&postID=7156362598882512105&page=8&token=1624543922881
  80.  
  81. http://lumenstudet.cempaka.edu.my/2015/12/giving-back-to-humanity-india-community.html?showComment=1624543966954#c2162112858284169473
  82.  
  83. http://elconcept.uoc.edu/2010/09/participation-of-our-team-in-iceri-2010.html?showComment=1624544056053#c4984650130494651123
  84.  
  85. http://pointer.komunitas.uksw.edu/2009/10/tips-hari-ini-membersihkan-monitor.html?showComment=1624544118205#c813332276730635373
  86.  
  87. http://ict.bhcs.vic.edu.au/2010/08/activinspire-manual-by-karen.html?showComment=1624544176982#c8349028657582716354
  88.  
  89. http://wells-status.gsu.edu/2012/09/banner-turned-over-for-testing.html?showComment=1624544250076#c2739580950601589578
  90.  
  91. http://blogtest.the-bac.edu/2015/06/first-test-post.html?showComment=1624544300701#c7796420344045403744
  92.  
  93. http://blogs.geelongcollege.vic.edu.au/researchproject/2015/07/19/student-reflection/comment-page-22/#comment-11560
  94.  
  95. http://education-for-sustainability.blogs.latrobe.edu.au/2014/03/sustainability-virtuous-or-vulgar-in.html?showComment=1624544466836#c5082907124907760252
  96.  
  97. https://www.blogger.com/comment.g?blogID=8407403355601725364&postID=1004993989326056442&page=1&token=1624544508460
  98.  
  99. https://www.blogger.com/comment.g?blogID=8608412012855561239&postID=221773169318426721&page=1&token=1624544554995
  100.  
  101. .................
  102. http://www.tasty-trials.com/2011/09/end-is-near.html?showComment=1624552870920#c6768456799150614900
  103.  
  104. http://www.tipsglobe.com/2015/08/facebook-smiley-emoji-emoticons.html?showComment=1624552942741#c1498358508979278109
  105.  
  106. http://www.analyticsforfun.com/2014/04/how-to-move-your-blog-from-tumblr-to.html?showComment=1624553004521#c3903010780667485772
  107.  
  108. https://www.daily-affair.com/2017/04/why-you-should-be-sending-handwritten.html?showComment=1624553070715#c8826070346561140118
  109.  
  110. http://www.yourfashionmoment.com/2019/03/new-in-town.html?showComment=1624553254226#c135284549780653187
  111.  
  112. https://www.kerryhawk02.com/2013/11/teaching-19th-century-ideologies-with.html?showComment=1624553305733#c3672453467640794408
  113.  
  114. https://vilim1978709.blogspot.com/2018/11/5-tips-for-budding-entrepreneurs-before.html?showComment=1624553348271#c3781977816880414927
  115.  
  116.  
  117.  
  118.  
Add Comment
Please, Sign In to add comment