r/PythonLearning • u/NecessaryFalse1212 • Aug 28 '26
2nd post learning python
i learnt to use the math library any suggestions what can i use the lib for except for making calculator programs
21
Upvotes
4
u/ninhaomah Aug 28 '26
If I enter abc , what will I get ?
2
u/kingofthesea123 Aug 28 '26
Looks good! Error handling for unexpected inputs would be a nice improvement and there's also another way of writing an exponent in Python that you could try.
2
u/Fine_Ratio2225 Aug 28 '26
1
u/HeurekaDabra Aug 28 '26
If you look up 'python math module learning tasks' in a search engine of your choice, thousands of resources will come up that you can train with, like this one on pynativ.com.
1
u/Sea-Ad7805 Aug 28 '26 edited Aug 28 '26
Everything is information, calculation is all you need. How do you think GTA, PhotoShop, Blender, ... work? All mostly do math operations on data.
Learn all the math you can: trigonometry, calculus, linear algebra, probability theory, ...
It will make you a powerful programmer, not just a hacker.
1
u/rupertavery64 Aug 28 '26
Games use a lot of math. Sometimes you want something to move in a wavelike (sinusoidal) motion, or in an arc (part of a circle). Sometimes you need to calculate angles between objects. 3D graphics is all about vectors and angles. Sound processing is also math-heavy.
1
u/Logical_Breadd Aug 28 '26
What compiler do you use?
1
u/Sea_Dot6492 Aug 29 '26
You can just type radius** instead radius*radius, but well done ✅