I may get a potential bug

def rental_car_cost(days): 
  rental =  days * 40
    if days >=  7:
      rental -=  50
    elif days >=  3:
      rental -= 20
    return rental

This is my solution, when I click run button, it takes a very long time to process,refreshing the page won’t work this time. Moreover, it shows a very long error message just after I click the run button.here is the error message.
Traceback (most recent call last):
File “/var/codecademy/codex/runners/python/cli_runner.py”, line 152, in
File “/var/codecademy/codex/runners/python/base_runner.py”, line 46, in start
self.handle_command(command, code)
File “/var/codecademy/codex/runners/python/cli_runner.py”, line 77, in handle_command
res = self.execute(code, self.run_globals)
File “/var/codecademy/codex/runners/python/cli_runner.py”, line 119, in execute
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xef in position 23: ordinal not in range(128)



def rental_car_cost(days): 

the ( you are using is not a valid unicode character, which the error message is telling you:

UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xef in position 23


:sweat_smile: Yes! Thanks, but during that period,I really cannot figure it out by myself.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.