Trigonometry calculator | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Trigonometry calculator

Hello, can you help me to optimize my code. Thanks https://sololearn.com/compiler-playground/c2gO7XU1tbDC/?ref=app

15th Mar 2024, 1:34 PM
Onéos
1 ответ
+ 2
Hi, Onéos ! A few optimizations for your code: (i) Consider precise imports from math, e.g, from math import atan, degrees, to avoid importing everything. (ii) Your three functions have similar patterns. Explore combining them to reduce repetition. (iii) Enhancing readability with descriptive variable names can make your code easier to follow.
15th Mar 2024, 2:26 PM
Per Bratthammar
Per Bratthammar - avatar