You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A tip written with a percent sign, like 15%, crashes splitbill. The --help text and README say both 15 and 15% work.
Steps to reproduce
python bug-hunt/splitbill.py 100 --tip 15
What did you expect?
A tip of $15.00 and a total of $115.00. README.md says "15" and "15%" mean the same.
What happened instead?
Traceback (most recent call last):
File "bug-hunt/splitbill.py", line 61, in <module>
raise SystemExit(main())
^^^^^^
File "bug-hunt/splitbill.py", line 46, in main
tip_percent = parse_percent(args.tip)
^^^^^^^^^^^^^^^^^^^^^^^
File "bug-hunt/splitbill.py", line 18, in parse_percent
return float(text)
^^^^^^^^^^^
ValueError: could not convert string to float: '15%'
Activity
divya0795 commentedon Nov 26, 2026
Closing: I opened this from the CLI, so the bug-hunt label wasn't applied and the bot skipped it. Re-filing through the Bug hunt form for #45.
Lesson 09: use the form, because learners can't add the label from gh