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
TEA [102]
3 years ago
3

Write the function definition for the generato named 'generator_Magic which takes a single parameter 'n1', an Intege 1. Define t

he above Generator such tha it should yield the Magic constant(s) for the values starting from 3 to 'n1'. Note Printing the output will be taken care of during testing, so you need not print the Magic constants yielded by generator 'generator_Magic' and its Type. Input Format for C
Computers and Technology
1 answer:
never [62]3 years ago
8 0

Answer:

Method definition to this question can be defined as follows:

def generator_Magic(x1):#defining a method generator_Magic that accepts a variable  

   x = 3#defining a variable n that holds a integer value

   while x <= x1:#defining while loop that check value of x less than x1  

       Val = (x * (( x * x) + 1)) / 2#defining val variable that calculate value  

       #yield val

       return Val#return Val

       n = n + 1#increment the value of n

Explanation:

In the given question some of the data is missing that's why we only define the code, which can be defined as follows:

In this code a, method "generator_Magic" is declared, that hold one parameter "x1" in its parameter, and inside the method, a variable x is declared that hold an integer value and define a while loop to check value is greater than equal to "x1" and calculate the value into "Val" variable and return its value.

You might be interested in
A selected graphic appears surrounded by a(n) ______, which has small squares and circles around its edges.
Elza [17]
Sizing handles :))))))))))
8 0
3 years ago
Guess the output of this code:<br>print( (3**2)//2)​
tigry1 [53]

Answer:

hope it helps dear, please let me know! what is the question exactly....in words?good luck

4 0
3 years ago
To change the overall design of an entire document to include colors, fonts, and effects, a user should apply a _____.
Olenka [21]
User should apply a theme.

Hope this helps!
8 0
3 years ago
Read 2 more answers
Why doesn't the ad load ?
baherus [9]
Try refreshing the page, if not restart your device check your internet etc.
3 0
2 years ago
Read 2 more answers
An educational institution has a number of buildings in the campus. Each building has its own independent network system, and al
klemol [59]

Answer:

The answer is C) tree topology

8 0
3 years ago
Other questions:
  • All of the following are types of data storage devices except CD/DVD computer monitor digital cameras flash drive
    15·1 answer
  • i got a set of headphones and when i plug them into my speakers the right side only works how do i fix the left side of them
    12·1 answer
  • Which operating system became obsolete with the arrival of more advanced graphical user interfaces
    12·1 answer
  • Why has the PCM sampling time beenset at 125 microseconds?
    11·1 answer
  • A website for a certain political party or candidate is likely to have unbiased
    6·1 answer
  • Which of these is an example of input?
    6·1 answer
  • Is Microsoft team voice lagging for people who use it I want to know I only want to know if you use it ok not if you don’t.
    6·1 answer
  • The platform in E-Learning refers to:
    9·1 answer
  • I neeed help pleaseeee
    7·1 answer
  • A(n) ________ is a wonder of miniaturization combining a CPU, GPU, and sundry other support logic onto a single silicon die, sav
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!