The Event Organizing Company "Buzzcraft" focuses on event management in a way that creates a win-win situation for all involved stakeholders. Buzzcraft doesn't look at building one-time associations with clients, instead, aims at creating long-lasting collaborations that will span years to come. This goal of the company has helped them evolve and expand big with more workforces within a notable time.The number of employees of the company from the start day of their journey till now is recorded sensibly and it seemed to have followed a specific series like 20, 60, 104, 152, 204,…….Write a program that takes an integer N as the input and will output the series till the Nth term.Input format :The input consists of an integer N.Output format :The output prints the series till the Nth term, each separated by a comma.Refer to the sample output for formatting specifications.Sample test cases :Input 1 :5Output 1 :20 60 104 152 204 Input 2 :10Output 2 :20 60 104 152 204 260 320 384 452 524
Question
The Event Organizing Company "Buzzcraft" focuses on event management in a way that creates a win-win situation for all involved stakeholders. Buzzcraft doesn't look at building one-time associations with clients, instead, aims at creating long-lasting collaborations that will span years to come. This goal of the company has helped them evolve and expand big with more workforces within a notable time.The number of employees of the company from the start day of their journey till now is recorded sensibly and it seemed to have followed a specific series like 20, 60, 104, 152, 204,…….Write a program that takes an integer N as the input and will output the series till the Nth term.Input format :The input consists of an integer N.Output format :The output prints the series till the Nth term, each separated by a comma.Refer to the sample output for formatting specifications.Sample test cases :Input 1 :5Output 1 :20 60 104 152 204 Input 2 :10Output 2 :20 60 104 152 204 260 320 384 452 524
Solution
This problem can be solved using Python programming language. The series seems to be increasing by multiples of 4 more than the previous difference. The difference between the terms are 40, 44, 48, 52, and so on.
Here is a Python program that will solve the problem:
def print_series(n):
a = 20
diff = 40
series = []
for i in range(n):
series.append(a)
a += diff
diff += 4
return series
n = int(input())
series = print_series(n)
print(" ".join(map(str, series)))
In this program, we first define a function print_series that takes an integer n as input and returns the series till the nth term. We start with a as 20 and diff as 40. In each iteration of the loop, we append a to the series, then increase a by diff and increase diff by 4.
After defining the function, we take an integer input n, call the function with n as argument to get the series, and then print the series. The map function is used to convert each integer in the series to string, and join is used to join them with a space in between.
Similar Questions
Event Vision for the EmpowHer: Curves & Cultures Collide - Event Managers are visionaries, they have a vivid, distinct and detailed vision of some future happening. - Event managers turn this vision into reality in an organized step-by-step manner - Most people who plan events makes the mistake of creating the product first even before trying to understand for whom it is and why it is to happen. - Thus, it will be very likely that important details will be missed, and possibly even the whole reason for which the event is staged.
Which one of the following apps can be used to overcome the challenge in the following business scenario?A start-up learning and development company has a diverse team scattered across the globe. They have had frequent challenges of not being able to agree on meetings that suit all employees and have had an array of scheduling conflicts.Question 1Select one:a.World Time Buddyb.GitHubc.Slackd.Microsoft Teams
This a visual presentation concepts that help structure information into organizational patterns.*Graphic OrganizerBasic OutlineBrainstormingBrainstorming List
Q3. What do you mean by business organization?
what is organization?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.