Computers and Technology
Computers and Technology, 09.11.2020 09:00, yaquiii70

Problem 3: Pentagonal Number Write a function that takes a positive integer and calculates how many dots exist in a pentagonal shape around the center dot on the Nth iteration.
In the image below you can see the first iteration is only a single dot. On the second, there are 6 dots. On the third, there are 16 dots, and on the fourth there are 31 dots.

Return the number of dots that exist in the whole pentagon on the Nth iteration.

Sample input/output:
Enter an integer: 8
The number of dots in a pentagonal shape with 8 iterations is 141

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 07:10, anika420
If you want to import a picture into a dtp application, what must you do first? draw an image frame. import text. open the folder containing the file. select get image… from the windows menu.
Answers: 2
image
Computers and Technology, 24.06.2019 17:00, 322993
Following are uses of spreadsheets. for each use, choose whether the use is a business use, consumer use, or student use. family budget: sales data: recording research data for science class:
Answers: 2
image
Computers and Technology, 24.06.2019 22:30, toricepeda82
What are the 4 basic items that are traded throughout the world?
Answers: 1
image
Computers and Technology, 25.06.2019 04:40, melG101
1. instructions: in your response, make an argument for whether for whether it is better for waketown to build its new wake heights subdivision or to preserve the wake wetlan to preserve the wake wetland preserve. use evidence from at least two of the sources below to support your claim. be sure to introduce your precise claim, develop the claim with evidence from the sources, and demonstrate relationships between ideas. (15 points)
Answers: 2
Do you know the correct answer?
Problem 3: Pentagonal Number Write a function that takes a positive integer and calculates how many...

Questions in other subjects:

Konu
Geography, 15.10.2020 23:01