floating point – TypeError: a float is required – Python
floating point – TypeError: a float is required – Python
Youre passing string variables to math.sin and math.asin, which is causing the type error. You can fix by converting to float:
ang = format(math.asin(float(side_b)* (math.sin(float(angle_a))/float(side_a))),.3f)
You could also just store all these variables as floats to begin with.
floating point – TypeError: a float is required – Python
Related posts
- What is the point of float(inf) in Python?
- matplotlib – Whats the fastest way of checking if a point is inside a polygon in python
- anaconda – How to Fix Entry Point Not Found while installing libraries in conda environment
- Are Python variables pointers? Or else, what are they?
- python – Is floating point arbitrary precision available?
- python – Matplotlib scatter plot with different text at each data point