Tell us what’s happening:
Describe your issue in detail here.
The code wrote works pretty much perfectly and outputs correctly using the sample code as well as on my own console however the tests albeit 2 all fail.
Thanks I think I have sourced where the issue is, but I honestly dont know why its giving that value. The code is meant to find the largest number using the max function between 123 and 49 but for some odd reason it picks 49 so it figures out the spacing using 49. But for all other instances it picks the right number
#Checks if operator is a '-'
elif problem.find('-') != -1:
sub = problem.split(' - ')
#Checks if list of operands are integers only
if "".join(sub).isnumeric() is False:
return 'Error: Numbers must only contain digits.'
continue
#Initialize unique variables for format
*lrg = max(sub)*
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.