subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
The mode is generally used when delivering a presentation to an need now
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
question
Computers and Technology, 23.06.2019 10:50
Your friend kayla is starting her own business and asks you whether she should set it up as a p2p network or as a client-server network. list three questions you might ask to kayla decide which network to use and how her answers to those questions would affect your recommendation.
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
You know the right answer?
Problem 3: Pentagonal Number Write a function that takes a positive integer and calculates how many...
Questions
question
Mathematics, 09.10.2020 08:01
question
Mathematics, 09.10.2020 08:01
question
Mathematics, 09.10.2020 08:01
Questions on the website: 13722359