How to find cos(60) in radin measure after importing math function

0 votes
In python using cos function
Feb 22 in Python by Kushal
• 120 points
43 views

1 answer to this question.

0 votes

Hi Kushal! 

If you have the value of radian, then you have to convert it to a degree and then find the cos.

Suppose you have to find cos(60), 60 degrees = 1.0471975511965976 radians. So the code you will have to use is:

math.cos(math.degrees(1.0471975511965976))
answered Feb 22 by Omkar
• 67,660 points

Related Questions In Python

0 votes
1 answer

How to hide a window in the constructor immediately after creation?

You can use QtCore.QTimer class Example(QWidget):     def __init__(self, app):         QWidget.__init__(self)         QTimer.singleShot(0, ...READ MORE

answered Apr 17, 2018 in Python by anonymous
38 views
–1 vote
2 answers

How to find the size of a string in Python?

following way to find length of string  x ...READ MORE

answered Mar 29 in Python by rajesh
• 1,210 points
100 views
0 votes
1 answer

How to find index from raw and column in python?

You probably want to use np.ravel_multi_index: import numpy as ...READ MORE

answered Sep 12, 2018 in Python by Priyaj
• 56,900 points
72 views
0 votes
1 answer

How to find index from raw and column in python?

You probably want to use np.ravel_multi_index: import numpy as ...READ MORE

answered Sep 24, 2018 in Python by Priyaj
• 56,900 points
39 views
0 votes
1 answer

How to use a global variable in function?

The global variable can be used in ...READ MORE

answered Sep 27, 2018 in Python by SDeb
• 13,180 points
31 views
0 votes
1 answer

Index of predicted wrong data in Keras, how to find it?

Simply, use: model.predict() pred = model.predict(x_test) indices = [i for ...READ MORE

answered Sep 28, 2018 in Python by Priyaj
• 56,900 points
380 views
0 votes
1 answer

How to print objects of class using print function in Python?

It can be done as shown below: class Element: ...READ MORE

answered Dec 3, 2018 in Python by Nymeria
• 3,520 points

edited Dec 19, 2018 by Nymeria 2,706 views
0 votes
1 answer

How to measure time elapsed in Python?

If you just want to measure the ...READ MORE

answered Dec 4, 2018 in Python by SDeb
• 13,180 points
1,080 views
0 votes
1 answer

How to find if setuptools is installed in python?

You can use python interpreter to check ...READ MORE

answered Jan 29 in Python by Omkar
• 67,660 points
33 views
0 votes
1 answer

How to run a Function in Spyder and check output?

You will see the output of the ...READ MORE

answered May 17 in Python by Omkar
• 67,660 points
456 views