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
lys-0071 [83]
3 years ago
8

The Fibonacci sequence 1, 1, 2, 3, 5, 8, 13, 21…… starts with two 1s, and each term afterward is the sum of its two predecessors

. Please write a function, Fib(n), which takes n as the input parameter. It will return the n-th number in the Fibonacci sequence. Using R, the output for Fib(9) should give only the 9th element in the sequence and not any of the previous elements. Please Help :)
Engineering
2 answers:
Novay_Z [31]3 years ago
5 0

9th value is 34

Explanation:

R or Fib (n) function is given by: (n - 1) + (n - 2), where n is the number in the Fibonacci sequence .

Hence, fib (9) = (9 - 1) + (9 - 2)

                      = 8th value + 7th value on the sequence summed together  

<em>Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13, 21.</em><em> </em>The 8th value is 21 and the 7th value is 13.  

R = (n - 1) + (n - 2)

R (9) 0r Fib (9) = 21 + 13

           = 34

Olin [163]3 years ago
5 0
<h2>Answer:</h2>

  #Create a function Fib to return the nth term of the fibonacci series

  #Method header declaration

   Fib <- function(n)  {

 

   #when n <= 1, the fibonacci number is 1

   #hence return 1

   if (n <= 1)

           return(1)

   #when n = 2, the fibonacci number is 1

   #hence return 1

   else if (n == 2)

            return(1)

   

   #at other terms, fibonacci number is the sum of the previous two

   #numbers.

   #hence return the sum of the fibonacci of the previous two numbers

   else

           return( Fib(n-1) + Fib(n-2))

   }    #End of method.

============================================================

<h2>Sample Output:</h2>

A call to Fib(9) will give the following output:

>> 34

============================================================

<h2>Explanation:</h2>

The above program has been written in R language and it contains comments explaining each of the lines of code. Please go through the comments in the code.

For readability, the actual lines of code have been written in bold face to distinguish them from the comments.

You might be interested in
Some of our modern kitchen cookware is made of ceramic materials. (a) List at least three important characteristics required of
Alisiya [41]

Answer:

A)

It should be Non- toxic

It should possess high Thermal conductivity

It should have the Required Thermal diffusivity

B)

  • stoneware : This material has good thermal diffusivity and it  is quite affordable and it is used in making pizza stones
  • porcelain: mostly used for mugs and it is non-toxic
  • Pyrex : posses good thermal conductivity used in oven

C)   All the materials are suitable because they serve different purposes when making modern kitchen cookware

Explanation:

A) characteristics required of a ceramic material to be used as a kitchen cookware

  • It should be Non- toxic
  • It should possess high Thermal conductivity
  • It should have the Required Thermal diffusivity

B) comparison of three ceramic materials as to their relative properties

  • stoneware : This material has good thermal diffusivity and it  is quite affordable and it is used in making pizza stones
  • porcelain: mostly used for mugs and it is non-toxic
  • Pyrex : posses good thermal conductivity used in ovens

C) material most suitable for the cookware.

 All the materials are suitable because they serve different purposes when making modern kitchen cookware

8 0
3 years ago
What does an aeronautical engineer design
Colt1911 [192]

Answer:

they work with aircraft, designing aircrafts.

Explanation:

3 0
3 years ago
Kinetic energy is defined as energy of an object in:
Murrr4er [49]

your answer is c. motion

5 0
3 years ago
Read 2 more answers
provides steady-state operating data for a solar power plant that operates on a Rankine cycle with Refrigerant 134a as its worki
Vaselesa [24]

Answer:

hello some parts of your question is missing attached below is the missing part ( the required fig and table )

answer : The solar collector surface area = 7133 m^2

Explanation:

Given data :

Rate of energy input to the collectors from solar radiation = 0.3 kW/m^2

percentage of solar power absorbed by refrigerant = 60%

Determine the solar collector surface area

The solar collector surface area = 7133 m^2

attached below is a detailed solution of the problem

8 0
3 years ago
A cylindrical specimen of this alloy 12 mm in diameter and 188 mm long is to be pulled in tension. Assume a value of 0.34 for Po
kicyunya [14]

This question is incomplete, the missing image in uploaded along this answer below.

Answer:

The required stress is 200 Mpa

Explanation:

Given the data in the question;

diameter D = 12 mm = 12 × 10⁻³ m

Length L = 188 mm = 188 × 10⁻³ m

Poisson's ratio v = 0.34

Reduction in diameter Δd = 0.0105 mm = 0.0105 × 10⁻³ m

The transverse strain will;

εˣ = Δd / D

εˣ = -0.0105 × 10⁻³ /  12 × 10⁻³ m

εˣ = -0.00088

The longitudinal strain will be;

E^z = - ( εˣ  / v )

E^z = - ( -0.00088  / 0.34 )

E^z = - ( - 0.002588 )

E^z = 0.0026

Now, Using the values for strain, we get the value of stress from the graph provided in the question, ( first image uploaded below.

From the graph, in the Second image;

The stress is 200 Mpa

Therefore, The required stress is 200 Mpa

8 0
3 years ago
Other questions:
  • The displacement volume of an internal combustion engine is 2.2 liters. The processes within each cylinder of the engine are mod
    13·1 answer
  • Can anybody teach me how to make an app with flask and pygame together?​
    10·1 answer
  • Using phasors, the value of 37 sin 50t + 30 cos(50t – 45°) is _________ cos(50t+(_____°)). Please report your answer so the magn
    5·1 answer
  • ممكن الحل ............
    10·1 answer
  • True/False
    15·1 answer
  • Argon is compressed in a polytropic process with n = 1.2 from 100 kPa and 30°C to 1200 kPa in a piston–cylinder device. Determin
    14·1 answer
  • An engineer is trying to build a new measurement tool. Which step should the engineer complete first? A. Design a model of the t
    8·1 answer
  • I wuv little space :)
    8·1 answer
  • Physical properties of minerals
    10·2 answers
  • Which alpha-numeric designator, systematically assigned at the time of manufacture, identifies the manufacturer, month, year, lo
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!