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
Jlenok [28]
3 years ago
15

Given a variable, polygon_sides, that is associated with a dictionary that maps names of polygons to number of sides, create a n

ew dictionary that maps number of sides to polygon names, and associate it with a variable n_polygons.
Computers and Technology
1 answer:
sveticcg [70]3 years ago
3 0

Answer:

polygon_sides = {"Triangle" : 3,"Square" : 5}

n_polygons = {}

for key in polygon_sides:

   n_polygons[polygon_sides[key]] = key

print("Polygon sides: ", polygon_sides)

print("Names of polygons: ", n_polygons)

Explanation:

  • Initialize the polygon_sides dictionary.
  • Loop through polygon_sides dictionary and assign the associated names to n_polygons variable.
  • Display the polygon sides and the names of polygons.
You might be interested in
Array elements are differentiated because each has a unique: O A) Range O B) Data Type o c) Index O D) Value
Hoochie [10]

Answer

The correct answer is option(C) which is "Index".

Explanation:

Array elements can be differentiated because each element in the array have different index value.In the array all elements are of same data type, so we can not differentiated them on the basis of data type. Also an array can have same value many times, That is why we can not differentiated them on this basis. In the array elements are from any range, so its not possible to distinguish them on range. We can only distinguish elements of an array on their index value because each element have different index in the array.

7 0
3 years ago
The term which refers to the attempt to gain unauthorized access to systems and computers used bya telephone company to operate
Alex787 [66]

Answer: Phreaker

Explanation:

Phreaker is defined as the unauthorized attack on  authorized communication system for stealing and manipulation phone networks.

  • Exploring,searching and identifying telecommunication field with help of technologies,equipment,tools etc is done to exploit the system and resources .
  • Other options are incorrect because phone hacking is attacking phone device, [email protected] is also hacking source and hacktivist hacks system to impact social and political field.
  • Thus, the correct option is option(d)
8 0
3 years ago
Your first job is to create a Java program that repeatedly asks the user whether they wish to calculate another square root. If
Zinaida [17]

Your first job is to create a Java program that repeatedly asks the user whether they wish to calculate another square root. If the response is "y", then the program should proceed; if it is anything else, then the program should quit. Whenever it proceeds, the program should prompt the user for a number (a positive double, and your program may simply assume the input is consistent with this requirement) and then report the square root of that number to within a relative error of no more than 0.01%. The computation must be done using Newton iteration.

The intuitive idea of Newton iteration for computing square roots is fairly straightforward. Suppose you have a guess r for x1/2 that is too large; the argument is similar if it is too small. If r is too large to be the square root of x, then x/r must be too small, so the average of r and x/r should be a better guess than either r or x/r. This suggests that if you repeatedly replace your current guess r by (r + x/r)/2, then your sequence of guesses should converge to x1/2. And indeed it can be proved that it does. A good initial guess for x1/2 is simply r = x. If you continue updatingr until |r2 – x |/x < ε2, then the relative error of the guess r will be less than ε.

After your initial program works, there are a number of other requirements to change it slightly, one step at a time, as explained below.

Open the src folder of this project and then open (default package). As a starting point you should useProgramWithIOAndStaticMethod.java. Rename it Newton1 and delete the other files from the project (if needed, see Creating a Program from a Skeleton (also Renaming a Java Program) for details).

Edit Newton1.java to satisfy the problem requirements stated above, including updating comments appropriately. Estimating the square root should be done in a static method declared as follows:

1

2

3

4

5

6

7

8

9

10

/**

* Computes estimate of square root of x to within relative error 0.01%.

*

* @param x

*            positive number to compute square root of

* @return estimate of square root

*/

private static double sqrt(double x) {

   ...

}

Copy Newton1.java to create Newton2.java. Change sqrt (including its Javadoc comments) so it also works when x = 0.

Copy Newton2.java to create Newton3.java. Change it so the main program prompts the user to input the value of ε (rather than assuming it is 0.0001), just once as the program begins, and so this value is also passed to sqrt.

Copy Newton3.java to create Newton4.java. Change it so the main program does not ask the user whether they wish to calculate another square root, but instead simply asks for a new value of x and interprets a negative value as an indication that it's time to quit.

Select your Eclipse project Newton (not just some of the files, but the whole project), create a zip archive of it, and submit the zip archive to the Carmen dropbox for this project, as described in Submitting a Project.

7 0
3 years ago
Word offers a multitude of picture formatting options that allow you to flip, rotate, and make many other adjustments to inserte
SIZIF [17.4K]

Answer:

True

Explanation:

In Microsoft Word, there are several formatting options available to format the inserted picture. Whenever we insert a picture, the picture formatting options will appear at the top of the program. One of the option, Rotate, enable user to rotate the picture 90 degree to the left or right and flip it vertically or horizontally. Besides, Word formatting options also include Crop feature, Color Corrections, Transparency Adjustment etc.

8 0
4 years ago
What is the correct keyboard shortcut to cut a cell value
vladimir2022 [97]

Answer:

Cntrl+X

Explanation:

Do it on your computer

4 0
3 years ago
Other questions:
  • Why are computer manufacturers constantly releasing faster computers? how do computer users benefit from the increased speed?
    7·1 answer
  • Over a TCP connection, suppose host A sends two segments to host B, host B sends an acknowledgement for each segment, the first
    6·1 answer
  • Explain in your own words how you can use MSCONFIG and Task Manager to troubleshoot problems on the computer.
    15·1 answer
  • Using ________ data mining, the user usually begins by telling the data mining software to look and test for specific patterns a
    15·1 answer
  • Which two of the following skills are important for a meteorologist
    12·1 answer
  • Why is it NOT a good practice to save everything on the desktop?
    6·2 answers
  • Add criteria to this query to return records where the student lastname field begins with the letter
    13·1 answer
  • What is the dark web and what is the .onion domain
    15·2 answers
  • Many physical features of CPUs have been upgraded over the years. Below are some the features that latest CPUs can perform. Brie
    14·1 answer
  • a company recently implemented a secure sockets layer/transport layer security (ssl/tls) version that supports secure hashing al
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!