I'm not sure what you mean by "improvise logic". Do you mean someone giving you a problem statement, and designing a program to solve it? For me, I read a little bit of a book to get a basis, then think of situations I know I will see in coding, like read a file, make a change, and save, or take a user input, do some fun things with it, then give an output. I then use the book to help me figure out how I should code such a scenario.
As for practicing math, you do need some mathmatical skills, and knowing complicated math concepts might make you able to write some more complex logic, but knowing high level math (like astrophysics) is definately not required. Unless of course you are writing a program that does some astrophysics-type calculations.
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
To improve my logic skills I practice taking everyday things apart mentally into algorithms/behaviors.
Like Starting a car, making breakfast, walking my dog (while !dog.hasGonePotty).
Making things up in my head helps me practice loops, if statements, and breaking down behaviors into the smallest pieces.
That's programming LOGIC. The understanding of how things work. I would say almost everything else is syntax and learning how to use the API effectively. Programming logic is used in any language you program in, only what you actually type is different.
My dad always said that a computer will only do what you tell it to do. You need to learn how to tell it what you really want.
When you do things right, people won't be sure you've done anything at all.
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
how do I do my own kindle-like thing - without amazon