Jan-20-2022, 01:56 PM
(Jan-20-2022, 01:32 PM)snippsat Wrote:(Jan-20-2022, 01:22 PM)Frankduc Wrote: ant say what is wrong still trying to understand how it works.This only work in Python 3.10 as structured pattern matching was new there,error message indicate that you run version less than this.
To recreate your error message.
Output:# Running Python 3.10 G:\div_code\match_stuff λ py -3.10 match2.py (1) Calculate two numbers (Q) Quit Enter your choice: 1 Select operation +, -, *, /: - Fist number: 100 Second number: 50 100 - 50 = 50 (1) Calculate two numbers (Q) Quit Enter your choice: q # Now try in Python 3.9 G:\div_code\match_stuff λ py -3.9 match2.py File "G:\div_code\match_stuff\match2.py", line 13 match us_in: ^ SyntaxError: invalid syntax
I am using online compilers, that explain. I am waiting to see what compiling program the school will suggest . I dont want to be force to reinstall some other compiler if i pick the wrong one. Windows already messy enough.
Thanks anyway ill keep the code and retry it in february.