Now this may sound confusing, but here is what I have to say. I have a simple Tkinter calculator which runs smoothly, but say for example when you enter something into the entry and the first entry is a 0 you can continue typing and clog your entry up with instances like 05 + 2, etc., which are incorrect on a math level. How can you stop this so 0 can only be followed by a decimal point or replaced by other numbers being pressed? So far just theory and need ideas to get this into code.
Asked
Active
Viewed 53 times
0
-
3Please provide an example code to reproduce. What have you tried so far? – Kefeng91 May 07 '18 at 13:29
-
Why not accept 05 as a valid alternative to 5? – Arndt Jonasson May 07 '18 at 13:40
-
Do you already have forbidden sequences? For example 5 + + 2? Use the same logic. – Arndt Jonasson May 07 '18 at 13:41
-
@ArndtJonasson how to do forbidden sequaences – John Smith May 08 '18 at 02:31