1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lorasvet [3.4K]
3 years ago
11

The trigonometry book says: sin^2(t) + cos^2(t) = 1 Write a Python program that verifies the formula with the help of the Python

Math module. Note that the trigonometric functions in the module act on the angles in radians. Your program should perform the following steps 3 times: 1. Pick a random number between 0 and 180 degrees representing an angle in degrees, say Dangle 2. Convert the angle from degrees to radians, say Rangle 3. Use the Math module to find and print the values of sin(Rangle) and cos(Rangle), and 4. Compute and print the value of the above expression: sin^2(Rangle) + cos^2(Rangle). You can then visually verify if the result printed is 1 (or close to it).
Computers and Technology
1 answer:
MAXImum [283]3 years ago
6 0

Answer:

If you open your python-3 console and execute the following .py code you will have the following output. (Inputing 20 e.g)

Write the angles in degrees: 20

radian angles is:  0.3490658503988659

cosene( 0.3490658503988659 ) =  0.9396926207859084

sine( 0.3490658503988659 ) =  0.3420201433256687

sin^2( 0.3490658503988659 ) + cos^2( 0.3490658503988659 ) =  1.0

Explanation:

Code

import math

for i in range(1,4):

   angle = int(input('Write the angles in degrees: '))

   #mat library better works with radians

   angle_radians = (angle*math.pi)/180

   #print output

   print('radian angles is: ',angle_radians)

   print('cosene(',angle_radians,') = ',math.cos(angle_radians))

   print('sine(',angle_radians,') = ',math.sin(angle_radians))

   res = (math.sin(angle_radians))**2 + (math.cos(angle_radians))**2

   print('sin^2(',angle_radians,') + cos^2(',angle_radians,') = ',res)

You might be interested in
Assume that you are able to do an exhaustive search for the key to an encrypted message at the rate of 100 Million trials per se
Len [333]

Answer:

Following are the solution to this question:

Explanation:

In point 1:

Trials frequency = \frac{100 \  million }{second}

calculating the main length of cryptography = 112 bit

\to 100\  Million = 1 \times 10^8

calculating the second year value:

\to 365 \times 24 \times 60 \times 60 =3153600\\\\

                                  =3.15 \times 10^7 \ seconds

Currently, in average , at least half the possible sleeves is being used to verify the encryption process:  2^{111} \ keys

\to \frac{2^{111} \time3s 10^6}{3.15 \times 10^7}\approx 8.22 \times 10^{20} \ years

the total time value will be 8.22 \times 10^{20} \ years

In point 2:

In cryptography, the common name is Triple DES (3DES), which would be the symmetric-key encrypted communication algorithm (TDEAor Triple DEA), which adds 3 times per block size only with the cryptographic method Data Encryption Standard ( DES).  

Algorithm:-

The key package involves four DES keys, K1, K2, and K3, each 56-bit (except parity bits), Triple DES includes. Its encoding algorithm is::  

ciphertext = EK3(DK2(EK1(plaintext)))

I.e. K1, DES encrypt, K2 decrypt, then K3 encrypt DES.  

The reverse is the decryption:  

plaintext = DK1(EK2(DK3(ciphertext)))

I.e. decrypt by K3, crypt by K2, decrypt by K1.  

Every three-bit authentication encrypts a 64-bit block.

Its middle procedure in each situation it's the reverse of the first operation. It improves the strength of the key second option algorithm which offers DES native support with key option 3.

4 0
3 years ago
"during the ________ stage of system development, system specifications that were prepared during the design stage are translate
Paraphin [41]
The correct answer is programming
Hope this helps! :)
5 0
4 years ago
Which of the following statements is true?
Alex787 [66]
Seasons are caused by the earths changing distance from the sun
6 0
3 years ago
You are the head of the corporate security department, and the Microsoft teamhas asked you for some assistance in setting the pa
IgorC [24]

Answer:

d. Local Security Policy

Explanation:

Local security policy refers to different security settings that are present on a local computer. Local security policy can include administrative rights assignments and password.

This can also mean policies that enables an administrators to set users privileges by so doing guiding what users are permitted to do on the computer.

6 0
3 years ago
What statement best describes percentage values in CSS?
tatuchka [14]

Answer:

D.It's a value that is relative to the width of its HTML element or to the page.

Explanation:

Hope it's right

4 0
3 years ago
Read 2 more answers
Other questions:
  • In order to paint a wall that has a number of windows, we want to know its area. Each window has a size of 2 ft by 3 ft. Write a
    12·2 answers
  • Which of the following guidelines about forwarding e-mail messages is most appropriate?
    12·2 answers
  • What is illegal to search on the internet?
    5·1 answer
  • When you insert an object in a document, word always inserts it as a floating object. true or false.?
    11·1 answer
  • How many different passwords are possible if each character may be any lowercase letter or digit, and at least one character mus
    6·1 answer
  • Which is true about POP3 and IMAP for incoming email?
    10·1 answer
  • An aircraft departs an airport in the mountain standard time zone at 1615 MST for a 2-hour 15-minute flight to an airport locate
    14·1 answer
  • Plz help
    8·1 answer
  • My brainly isnt working it isnt showing and answers wats going on? wat do i do
    14·2 answers
  • What is the unit of measure ment to easure cpu speed
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!