Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
if you're interested in authoring, begin there ;)
Sorry, i was dealing with a family issue and havent caught up to my emails. This bit of code is not my best work. Even for someone just learning, and it could have improved with some refactoring and review after i fixed the problem. Thats something i do well in SQL, but less so in Python. Ive also been working on a new container build with a better pipeline so i can seperste my different projects instead of lumping them all into one growing container. when i get time, im also hoping to write my first Kata. I have a good idea, but i need to learn how to author and adjust to the codewars platform
I see, didn't know it worked that way...))
surely beacause he didn't solve the kata in the same language than you did
Why can't I see your solution?
I get different tests coding in pyhton, but if you carefully read the instructions, there are several ommmisions. The first being that this eval only does simple mathematical statements, yet the EBNF says exression operator expression.
An expression could be any mathrmatical formula. So not an actual EBNF. For pyhton at least, the type and order of single or double quotes confused the hell out of me. I had one expected error test, that would work sometimes and then fail. I'm just learning python, but I've been an sql developer for 20 years, and I know how to concatenate complex strings. I think that there are errors both in the description and the coding evaluation. I've gone through the first fourty problems on project euler, and even though they dont request your code, the order of problems teaches the mathematical basis of programming. You start to see the picture as you work through the problems and think about prior progrmming you did.
This specific Kata reminds me of co-workers that request a program that is specifically mapped, then complain when the program design does not meet the actual usage needs. I have been to meetings explaining this, then was told to not make changes, then got blamed when the project didn't work. That's why smart developers save and organize all their e-mails. As far as furthering my pyhton development, the only observable learning was the code created by other users after I completed the project. My only advice is, if it's too complicated, its not efficient and probably there is a better way to code this. I hope there are better KATA's down the road. Have fun!!!
The operator '%' (I assume it is the modulus/remainder operator) only makes sense on integer values.
Should I round values or truncate to integer before evaluating it?
The description doesn't make it clear and neither does the examples.
This comment is hidden because it contains spoiler information about the solution
This was not fun or instructive in any way. I built the evaluate mathematical expressions in about 2 nights. I should have gone another way, but I used that as a base.
Since the EBNF was not technically correct, or I made assumptions, I had to print and recode for several tests
It wasn't pretty and it wasn't fun, but its done.
I just matched errors in the test cases instead of gaining any insights as to how to code better.
Just finished this one in Python.
I had a hard time dealing with unary negatives and also conversion to int or float.
A lot of whats out there on the web does not account for unary numbers.
I finally got a written article explaining how to do it, but implementing that took a while.
I think I took longer, becuase I didn't nail down the int float conversion first.
I kept changing both peices of code.
Lesson Learned!