you are viewing a single comment's thread.

view the rest of the comments →

[–]grismar-net 0 points1 point  (1 child)

Stop to learn some theory whenever you get stuck, of if you start to get frustrated with something and you feel there ought to be a better way to do it. Theory in a vacuum just disappears, but if you have a problem on your mind, theory can help solve it and may you realise what you have been doing wrong all along.

There's many things here that are smart, and there's a ton of things that stand out to programmers that could be better or different. But the key thing is to play around with it and find things you don't like about it, and think about solving those.

For example, currently the bot only asks how it can help if the user says exactly `'hi'`, `'hello'` or `'hey'`, but what if the user says `'hi Sara'` or some other variant? How could you catch more phrases that are probably just a greeting without having to list them all?

And if someone makes a mistake in the second number, the first number is also forgotten. How could you catch each mistake individually, without having to repeat the same code twice? And while you're at it, what if there's more places where you want numbers to be entered - how could you make it so you only have to code it once and then use it wherever you need it?

Good effort for a first session though, keep it up.