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]
3 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]3 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
In what way , if any, can your social media presence affect your chances of getting a job in social media?
____ [38]

Answer:

Your social media presence can affect your chances of getting a job anywhere, not only a job on social media.

Explanation:

Whatever you do online leaves a digital footprint. If you leave a bad digital footprint, it will be left there forever. This bad footprint could affect your chances of getting a job by setting a bad impression on the employers. The same could go for any good digital footprint you leave behind.

6 0
3 years ago
If my_string = "This is MY string!", why does print (my_string[0:7:5]) return "Ti" and not
notka56 [123]

In Python, a string is an array of characters, we can access these characters using index operator []. For example, we have a_string = "Hello World" a_string[0] prints the first character in string ('H').

We can also use index operator to make substrings, for example a_string[0:3] will make a substring with first, second, third and fourth character equal to "Hell".

Now to business

my_string = "This is MY string!"

print(my_string[0:7]) # Prints "This is "

print(my_string[0:7:5]) # Prints "T" then prints the sixth character since we start counting at 0 hence prints "Ti" (note that space is also a character).

Hope this helps.

7 0
4 years ago
1. You are given a database to create, however, you realize that in the instructions you are told to create relationships betwee
Alik [6]

Answer:

In your table create statement, you can reference a primary key of another table. This is called a foreign key.

The syntax varies per database type.

6 0
3 years ago
Jim is in the market for a car that will last for the next 10 years and has saved up some money for the purpose of a car. What’s
Ratling [72]
I would imagine car would still be the best means , it's tough to define without knowing where he lives and how much he travels
8 0
4 years ago
Define a character variable letterStart. Read the character from the user, print that letter and the next letter in the alphabet
lesantik [10]

Answer:

  1. declare variable
  2. get input
  3. display variable and also increment ASCII of variable and th en display it

Explanation:

  • In above code first we declare a character variable by (var).
  • Then we get a character input from user in (var).
  • Then display character input and at the same time we also display next character by incrementing the ASCII of character input by 1.
3 0
4 years ago
Other questions:
  • A method variable a class variable with the same name. a) acquiesces to b) destroys c) overrides d) alters
    14·1 answer
  • April plans on starting a perfume business and decides she needs to first
    15·1 answer
  • Jeremy, a newly appointed assistant Director, is excited about his job. the director of the movie has assigned him the responsib
    6·1 answer
  • PLEASE HELP!!!!!!!!!!!! IT'S VERY URGENT!!!!!!!!! Social Networks websites put the responsibility for intellectual property?
    13·2 answers
  • Extended ACLs can filter traffic based on _____. (Points : 3) protocol type
    8·1 answer
  • E. what component must be compatible with every other component of the computer?
    15·1 answer
  • You are in charge of an event at work. You want to plan and schedule events and resourse. What type of software should you use?
    14·2 answers
  • When talking about careers in designing game art, the unit mentioned that a good portfolio and a clear record of experience in g
    9·1 answer
  • Type the correct answer in the box.
    15·1 answer
  • Question 1 of 1
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!