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
The following relation schema can be used to register information on the repayments on micro loans.
Kruka [31]

Answer:

Check the explanation

Explanation:

Answer a):

From the given information, we can derive the following set of functional dependencies;

Borrower_id → name [given: every borrower is identified with an unique id]

Borrower_id → address [given: each borrower has only one address]

Borrower_id, Requestdate → loanamount [given: more than one loan cannot be requested by a single borrower]  

Borrower_id, requestdate, repayment_date →repayment_amount [given: a borrower can make multiple repayments on a single day, but not on a single loan]

From the above set of FDs, it is evident that we can uniquely identify all the other attributes of Repayment table, if we know the values of (borrower_id, requestdate, repayment_date). That is,

Borrower_id, requestdate, repayment_date →name, address, loanamount, repayment_amount.

Hence, attributes (Borrower_id, requestdate, repayment_date) together forms a candidate key.

Answer b):

Is the given relation Repayment is in 1NF?  

Yes. It has a key. Hence, we can make unique identification of records.

Is the given relation is in 2NF?  

No. We have the following partial key dependencies.  

1. We can easily derive name and address of every borrower if we know the borrower_id from the FDs Borrower_d →name, and Borrower_id →address.

2. We can derive the loanamount if we know borrower_id, and requestdate from the FD Borrower_id, Requestdate → loanamount.

Hence, the relation Repayment is not in 2NF. To convert it into a 2NF relation, we can decompose Repayment into the following relations;

Borrower (Borrower_id, Name, Address)

Borrower_loan (Borrower_id, Requestdate, Loanamount)

Repayment (Borrower_id, Requestdate, Repayment_date, Repayment_amount)

From the derived FDs, we know that all these tables are in 2NF.

Are these tables in 3NF?  

Yes. There are no transitive dependencies present in the above tables’ set of functional dependencies. Hence, we would say that all these tables are in 3NF.

Are these tables in BCNF?  

Yes. There are no more than one candidate keys present in the above set of tables. Hence the following decomposed tables are in Boyce-Codd Normal Form.

Borrower (Borrower_id, Name, Address)

Borrower_loan (Borrower_id, Requestdate, Loanamount)

Repayment (Borrower_id, Requestdate, Repayment_date, Repayment_amount)

6 0
3 years ago
Samantha was calculating a mathematical formula on an electronic spreadsheet. She used multiple values to recalculate the formul
Bezzdna [24]
<span>Random access memory. This problem requires you to know what the different types of memory are and their relative advantages and disadvantages. Let's look at them and see why 3 are wrong and one is correct. read-only memory: Otherwise known as ROM, this type of memory stores code that can't be over written. Used frequently for constant lookup values and boot code. Since it can't be written to by normal programs, it can't hold temporary values for Samantha. So this is the wrong choice. random-access memory: Otherwise known as RAM, this type of memory is used to store temporary values and program code. It is quite fast to access and most the immediately required variables and program code is stored here. It can both be written to and read from. This is the correct answer. hard disk: This is permanent long term readable and writable memory. It will retain its contents even while powered off. But accessing it is slow. Where the contents of RAM can be accessed in nanoseconds, hard disk takes milliseconds to seconds to access (millions to billions of times slower than RAM). Because it's slow, this is not the correct answer. But it's likely that Samantha will save her spreadsheet to hard disk when she's finished working with it so she can retrieve the spreadsheet later to work on again. compact disk: This is sort of the ROM equivalent to the hard disk. The data stored on a compact disk can not be over written. One way of describing the storage on a compact disk is "Write Once, Read many times". In most cases it's even slower than the hard disk. But can be useful for archiving information or making backups of the data on your computer.</span>
5 0
3 years ago
Read 2 more answers
Most computers and many mobile devices, such as smartphones and portable media players, can connect to which kind of network?
Zigmanuir [339]

Answer:

Wifi

Explanation:

because its wifi based

6 0
3 years ago
Traffic collisions are among the top killers of children in America.
Blababa [14]
Whats the question if its true or false, then true
8 0
3 years ago
Which statement is correct? a. choice of metric will influence the shape of the clusters b. choice of initial centroids will inf
katrin2010 [14]

Answer: the answer is c

Explanation:in general, the merges and splits in hierarchical clustering are determined in a greedy manner

8 0
3 years ago
Other questions:
  • A(n)________________ is something that goes into a system a resource such as time,money,communication,etc
    10·1 answer
  • Discuss how and why video game hardware affects game design and where you think the next generation of platforms will change tho
    9·1 answer
  • What is the difference between operating systems and application software?
    6·2 answers
  • This information is generally included on a fax cover sheet.
    15·1 answer
  • Which best describes the relationship between maximum cost-per-click (max. cpc) bids and ad rank?
    12·1 answer
  • 3. Assume a disk drive from the late 1990s is configured as follows. The total storage is approximately 675MB divided among 15 s
    11·1 answer
  • When Web users enter the URL www.CIWcertified.com in their browser address bar, they can access the official CIW Web site at the
    6·2 answers
  • What are the importance of switches in our electron device
    15·1 answer
  • A technician wants to consolidate and log specific alerts from network devices into a database so maintenance tasks and potentia
    11·1 answer
  • Hi! I'm Kayla! I was wondering who does homework on the weekends... anybody?? I guess almost everyone, including me. Anyways, le
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!