Python Forum
How to calculate tax with a variable input and if else
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to calculate tax with a variable input and if else
#3
(Aug-14-2020, 06:31 AM)bowlofred Wrote: How do you know it's not right? Do you have some test cases that are failing? What are the cases and how does your solution differ?



in fact this LAB is integrated in a training that I receive, since there are examples of (input / output) when I run the given examples (input) I have not the correct result like (output)

Quote:here are the examples and the results I should have
Sample input: 10000

Expected output: The tax is: 1244.0 thalers

Sample input: 100000

Expected output: The tax is: 19470.0 thalers

Sample input: 1000

Expected output: The tax is: 0.0 thalers

Sample input: -100

Expected output: The tax is: 0.0 thalers
Reply


Messages In This Thread
RE: How to calculate tax with a variable input and if else - by afefDXCTN - Aug-14-2020, 06:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] How to calculate tax with a variable input and if else rokemas 1 2,112 Dec-28-2020, 06:53 AM
Last Post: buran
  New to Python - tiny coding assistance on user input function and assign to variable Mountain_Duck 1 2,497 Mar-23-2019, 06:54 PM
Last Post: Yoriz
  How to make a dynamic variable based on input loltylerdowney 3 3,775 Nov-30-2017, 09:49 PM
Last Post: loltylerdowney

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020