Python Forum
why my function doesn't work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why my function doesn't work
#1
Hi, I am a beginner.

I need help. Why the code below doesn't return nothing?

def tax(year, value):
    if year > 2004:
        tax = value * 22 / 100
    else:
        tax = valor * 11 / 100


tax(2005, 100)

print (tax)
shows the error (or warning): <function tax at 0x00000000030F47B8>
Reply


Messages In This Thread
why my function doesn't work - by cimerio - Nov-19-2019, 06:51 PM
RE: why my function doesn't work - by ichabod801 - Nov-19-2019, 07:02 PM
RE: why my function doesn't work - by gontajones - Nov-19-2019, 07:09 PM
RE: why my function doesn't work - by cimerio - Jan-20-2020, 08:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  print doesnt work in a function ony 2 323 Mar-11-2024, 12:42 PM
Last Post: Pedroski55
  Why doesn't calling a parent constructor work with arbitrary keyword arguments? PurposefulCoder 4 974 Jun-24-2023, 02:14 PM
Last Post: deanhystad
  Why doesn't this code work? What is wrong with path? Melcu54 7 1,865 Jan-29-2023, 06:24 PM
Last Post: Melcu54
  color code doesn't work harryvl 1 915 Dec-29-2022, 08:59 PM
Last Post: deanhystad
  I dont know why my function won't work? MehHz2526 3 1,210 Nov-28-2022, 09:32 PM
Last Post: deanhystad
  client.get_all_tickers() Doesn't work gerald 2 1,739 Jun-16-2022, 07:59 AM
Last Post: gerald
  pip doesn't work after Python upgrade Pavel_47 10 4,272 May-30-2022, 03:31 PM
Last Post: bowlofred
  For Loop Works Fine But Append For Pandas Doesn't Work knight2000 2 2,048 Dec-18-2021, 02:38 AM
Last Post: knight2000
  Class Method to Calculate Age Doesn't Work gdbengo 1 1,725 Oct-30-2021, 11:20 PM
Last Post: Yoriz
  Process doesn't work but Thread work ! mr_byte31 4 2,659 Oct-18-2021, 06:29 PM
Last Post: mr_byte31

Forum Jump:

User Panel Messages

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