SlideShare a Scribd company logo
1 of 1
2. ( 50% ) Baisc Programming (a) A Fibonacci sequence is one where every element is a sum of
the previous three elements in the sequence. The first few elements of the Tribonacci sequence
are 0 , 1 , 2 , 4 , 7 , 13 , 24 , 44 , 81, 149. Please write BOTH R and Python program for checking
if an input of integer x is an element of the Tribonacci sequence.

More Related Content

More from duane12345678

2-4-22 James Urton- University of Washington News -Mosquitoes appear t.docx
2-4-22 James Urton- University of Washington News -Mosquitoes appear t.docx2-4-22 James Urton- University of Washington News -Mosquitoes appear t.docx
2-4-22 James Urton- University of Washington News -Mosquitoes appear t.docx
duane12345678
 
2- When an adult indicates a willingness to be bound by a contract she.docx
2- When an adult indicates a willingness to be bound by a contract she.docx2- When an adult indicates a willingness to be bound by a contract she.docx
2- When an adult indicates a willingness to be bound by a contract she.docx
duane12345678
 
2) Madeline Jacobson was on a hike in the mountains during the winter.docx
2) Madeline Jacobson was on a hike in the mountains during the winter.docx2) Madeline Jacobson was on a hike in the mountains during the winter.docx
2) Madeline Jacobson was on a hike in the mountains during the winter.docx
duane12345678
 

More from duane12345678 (20)

2018 Addifinoria biformation 1 The obly entry n the accumulaled deprec.docx
2018 Addifinoria biformation 1 The obly entry n the accumulaled deprec.docx2018 Addifinoria biformation 1 The obly entry n the accumulaled deprec.docx
2018 Addifinoria biformation 1 The obly entry n the accumulaled deprec.docx
 
2-4-22 James Urton- University of Washington News -Mosquitoes appear t.docx
2-4-22 James Urton- University of Washington News -Mosquitoes appear t.docx2-4-22 James Urton- University of Washington News -Mosquitoes appear t.docx
2-4-22 James Urton- University of Washington News -Mosquitoes appear t.docx
 
2-26 Find F-G- and H- and simplify-(c.docx
2-26 Find F-G- and H- and simplify-(c.docx2-26 Find F-G- and H- and simplify-(c.docx
2-26 Find F-G- and H- and simplify-(c.docx
 
2-4-3 Suppose a 10-digit phone number is transmitted by a cellular pho.docx
2-4-3 Suppose a 10-digit phone number is transmitted by a cellular pho.docx2-4-3 Suppose a 10-digit phone number is transmitted by a cellular pho.docx
2-4-3 Suppose a 10-digit phone number is transmitted by a cellular pho.docx
 
2--- 3-- How long do young chimps stay by their mothers' sides and wh.docx
2---  3-- How long do young chimps stay by their mothers' sides and wh.docx2---  3-- How long do young chimps stay by their mothers' sides and wh.docx
2--- 3-- How long do young chimps stay by their mothers' sides and wh.docx
 
2- Write a class named Student having two member functions named write.docx
2- Write a class named Student having two member functions named write.docx2- Write a class named Student having two member functions named write.docx
2- Write a class named Student having two member functions named write.docx
 
2- When an adult indicates a willingness to be bound by a contract she.docx
2- When an adult indicates a willingness to be bound by a contract she.docx2- When an adult indicates a willingness to be bound by a contract she.docx
2- When an adult indicates a willingness to be bound by a contract she.docx
 
2- Thomas is single- His taxable income is $100-000- How much will he.docx
2- Thomas is single- His taxable income is $100-000- How much will he.docx2- Thomas is single- His taxable income is $100-000- How much will he.docx
2- Thomas is single- His taxable income is $100-000- How much will he.docx
 
2- Suppose that quiz scores in a beginning statistics class have a mea.docx
2- Suppose that quiz scores in a beginning statistics class have a mea.docx2- Suppose that quiz scores in a beginning statistics class have a mea.docx
2- Suppose that quiz scores in a beginning statistics class have a mea.docx
 
2- Sandoval needs to determine its year-end inventory- The warehouse c.docx
2- Sandoval needs to determine its year-end inventory- The warehouse c.docx2- Sandoval needs to determine its year-end inventory- The warehouse c.docx
2- Sandoval needs to determine its year-end inventory- The warehouse c.docx
 
2- Let R-{(a-b)-(a-c)-(c-d)-(a-a)-(b-a)}- What is RR- the composition.docx
2- Let R-{(a-b)-(a-c)-(c-d)-(a-a)-(b-a)}- What is RR- the composition.docx2- Let R-{(a-b)-(a-c)-(c-d)-(a-a)-(b-a)}- What is RR- the composition.docx
2- Let R-{(a-b)-(a-c)-(c-d)-(a-a)-(b-a)}- What is RR- the composition.docx
 
2- Manuel has saved $700-000 throughout his life of work- He is ready.docx
2- Manuel has saved $700-000 throughout his life of work- He is ready.docx2- Manuel has saved $700-000 throughout his life of work- He is ready.docx
2- Manuel has saved $700-000 throughout his life of work- He is ready.docx
 
2- Label the elements as follows to identify the most likely place-tim.docx
2- Label the elements as follows to identify the most likely place-tim.docx2- Label the elements as follows to identify the most likely place-tim.docx
2- Label the elements as follows to identify the most likely place-tim.docx
 
2- Find three examples of how protists are important for society- Desc.docx
2- Find three examples of how protists are important for society- Desc.docx2- Find three examples of how protists are important for society- Desc.docx
2- Find three examples of how protists are important for society- Desc.docx
 
2- Construct a DFA to accept a language consisting of the set of all s.docx
2- Construct a DFA to accept a language consisting of the set of all s.docx2- Construct a DFA to accept a language consisting of the set of all s.docx
2- Construct a DFA to accept a language consisting of the set of all s.docx
 
2- An investor deposits 1000 today into an account paying an APR of 4-.docx
2- An investor deposits 1000 today into an account paying an APR of 4-.docx2- An investor deposits 1000 today into an account paying an APR of 4-.docx
2- An investor deposits 1000 today into an account paying an APR of 4-.docx
 
2- A random variable X has CDF FX(x)-0-x5(x+5)2-144-5x71-x7 Use the CD.docx
2- A random variable X has CDF FX(x)-0-x5(x+5)2-144-5x71-x7 Use the CD.docx2- A random variable X has CDF FX(x)-0-x5(x+5)2-144-5x71-x7 Use the CD.docx
2- A random variable X has CDF FX(x)-0-x5(x+5)2-144-5x71-x7 Use the CD.docx
 
2- (L03) Determine the missing amounts-.docx
2- (L03) Determine the missing amounts-.docx2- (L03) Determine the missing amounts-.docx
2- (L03) Determine the missing amounts-.docx
 
2- (2 points) What geological point did the engineers building the Ced.docx
2- (2 points) What geological point did the engineers building the Ced.docx2- (2 points) What geological point did the engineers building the Ced.docx
2- (2 points) What geological point did the engineers building the Ced.docx
 
2) Madeline Jacobson was on a hike in the mountains during the winter.docx
2) Madeline Jacobson was on a hike in the mountains during the winter.docx2) Madeline Jacobson was on a hike in the mountains during the winter.docx
2) Madeline Jacobson was on a hike in the mountains during the winter.docx
 

Recently uploaded

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 

2- (50-) Baisc Programming (a) A Fibonacci sequence is one where every.docx

  • 1. 2. ( 50% ) Baisc Programming (a) A Fibonacci sequence is one where every element is a sum of the previous three elements in the sequence. The first few elements of the Tribonacci sequence are 0 , 1 , 2 , 4 , 7 , 13 , 24 , 44 , 81, 149. Please write BOTH R and Python program for checking if an input of integer x is an element of the Tribonacci sequence.