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
AleksAgata [21]
4 years ago
7

(Geometry: area of a regular polygon)

Computers and Technology
1 answer:
nata0808 [166]4 years ago
8 0

Answer:

import math

n = int(input("Enter the number of sides: "))

s = float(input("Enter the length of a side: "))

area = (n * s**2) / (4 * math.tan(math.pi/n))

print("The area is: " + str(area))

Explanation:

*The code is in Python.

Import the <u>math</u> to be able to compute the <em>pi</em> and <em>tan</em>

Ask the user to enter the number of sides and the length of a side

Calculate the area using the given formula

Print the area

You might be interested in
Write a program to solve the selection problem. Let k = N/2. Draw a table showing the running time of your program for various v
Brums [2.3K]
So here is the code in Python:

n = 0.00 #this is a float because there are some numbers that are decimals.

while n < 20: #n which is 0.00 and while it is lower than 20 if runs the code below
n = n + 1 #it will add 1 to n everything it runs the code.
k = n / 2 #it will divide whatever n is everytime by 2
print(str(n) + '/2: ') # it's printing the number it's on
print(k) # prints the answer for the n.

You can change n to add by any, make n any num instead of 0.00 and you can change the while condition from n < 20 to any other logical statement. If you want to get creative you can take 2 inputs for numbers and make one of them the starting number and other one is the ending number. Also make sure to make n a number lower than you starting point because if you set n as your starting point then it will skip it.

4 0
3 years ago
3. This shows you the different things that all the tools can do, as you click on the tools
leva [86]
D that’s the answer I learn that in my old school
7 0
3 years ago
After machine language, what is the next most basic type of programming language, which still uses many length strings of numera
solniwko [45]
Basic would be the most basic lanauge. It was created in M.I.T. and was one of the first programming lanauges.
7 0
3 years ago
Why is it important to increase componentization and standardization?
liraira [26]
Jiskha help me with something similar with
8 0
3 years ago
How people select, interpret, remember, and use information to make judgments and decisions is called __________.
Svetradugi [14.3K]

Answer: Social Cognition

Explanation: hope this helps

6 0
4 years ago
Other questions:
  • Following a company on likedin is most similar to
    8·1 answer
  • 9. In Electronic Codebook (ECB): a. The message is broken into independent blocks which are encrypted b. The message is broken i
    6·1 answer
  • How to fix Please enable JS and disable any ad blocker
    13·2 answers
  • Exploring Arraylists. Remember that arraylists are good for adding and removing things, and that they are clock-cycle friendlier
    13·1 answer
  • Normal wear and road conditions can take their toll on a car’s steering and suspension system, altering __________. A. wheel ali
    15·2 answers
  • What expressions will initialize d with a random value such that all possible values for d are given by the inequality 1.5 ≤ d &
    8·1 answer
  • How was the Big Ben project similar to the investigation you conducted in class to determine if the table was vibrating? How is
    7·1 answer
  • If a while loop iterates forever,what is the most likely cause?
    12·1 answer
  • Which type of service offers a preconfigured testing environment for application developers to create new software applications?
    6·1 answer
  • eocs can be fixed locations, temporary facilities, or virtual structures with staff participating remotely.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!