Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using python and please don't forget indentations also please use comments when writing the code and you should use if statement 1.3 Question 2 (60

image text in transcribed

using python and please don't forget indentations also please use comments when writing the code and you should use if statement

1.3 Question 2 (60 points) Write a python program that computes the zakat, obligatory charity, on sheep. The program asks the user to input the number of sheep, and then the zakat is calculated based on the following schedule: The number of sheep ranging Zakat Amount From To 1 39 No zakat 40 120 121 200 1 sheep 2 sheep 3 sheep 201 399 400 499 4 sheep 500 599 5 sheep Same pattern as the last two rows Notes: Make sure that the input value is a positive integer. If not, the program must print the following message: "Wrong input. Number should be an integer greater than 0", and then terminate. Using loops in solving this question is not allowed. 1.3.1 Sample Runs Please enter the number of sheep: -3 Wrong input. Number should be an integer greater than 0 Please enter the number of sheep: 24 The zakat amount = 0 sheep Please enter the number of sheep: 119 The zakat amount = 1 sheep Please enter the number of sheep: 618 The zakat amount = 6 sheep

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

7. How will you encourage her to report back on the findings?

Answered: 1 week ago

Question

Were the decisions based on appropriate facts?

Answered: 1 week ago

Question

Were the right people involved in the decision-making process?

Answered: 1 week ago