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
vredina [299]
2 years ago
10

Please help, will give brainliest!!! I need help with these coding questions, any help is appreciated

Computers and Technology
1 answer:
olchik [2.2K]2 years ago
8 0

Answer:

class Foo:

   def F(self, n):

       if n == 1:

           return 1

       return self.F(n - 1) + 3 * n - 2

Explanation:

This should cover part a to this question. The thing I'm not sure on is they use the term "method" which in python technically means a class function...but then list one argument with the function call which makes me think it is possibly just supposed to be a regular function. Which would be the following snippet. It would depend on if you are using classes or not yet in your coding class.

def F(n):

   if n == 1:

       return 1

   return F(n - 1) + 3 * n - 2

Play around with it and look into python "lists" and "for loops" for part c. Part b I'm not sure what kind of example they want since I'm not in that class. Good luck!

You might be interested in
The ____ algorithm was the first public key encryption algorithm developed (in 1977 and published for commercial use.
Whitepunk [10]
The RSA Algorithm was developed by and named after the initials of: Ron Rivist, Adi Shamir, and Leonard Adleman while they were working at MIT. It was developed in 1977 and published in 1978.  The algorithm uses the exponentiation modulo in encrypt and decrypt information. 
7 0
3 years ago
Do you want my hero academia?<br><br><br><br><br><br> if so, who's your favorite character :&gt;
VMariaS [17]

Shoto Todoroki and Katsuki Bakugo

4 0
2 years ago
Read 2 more answers
Take some time to do some research about small businesses in your area. Select one and using HTML design a simple site that educ
lina2011 [118]

Answer:

All you have to do is whright about it

Explanation:

3 0
2 years ago
How does the speaker feel about traditional forms of poetry
Salsk061 [2.6K]
A speaker sometimes is not able to capture the intended details since it is affected by homophones.
7 0
3 years ago
Read 2 more answers
The rules of a programming language constitute its__________________
kogti [31]
The rules of a programming language constitute its syntax.
7 0
1 year ago
Other questions:
  • An analyst is reviewing the logs from the network and notices that there have been multiple attempts from the open wireless netw
    13·1 answer
  • You can toggle between different types of references by pressing the ____ key on your keyboard.
    15·1 answer
  • The item that is clicked in a JList can be retrieved using the _____ method of JList.
    8·1 answer
  • What is renewable energy
    13·2 answers
  • How many positions there are in the media and design department?
    14·2 answers
  • What keyboard functions lets you delete words
    9·2 answers
  • Question # 5
    6·1 answer
  • How would you describe binary to someone ??<br> PLEASE ANSWER I WILL GIVE U BRAINLY!!
    15·2 answers
  • Select the correct answer
    15·1 answer
  • The current annual interest rate is 5 percent, and you are taking out a 20-year loan with a monthly end-of-month payment. If you
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!