SlideShare a Scribd company logo
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

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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 
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-.docxduane12345678
 
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.docxduane12345678
 
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-.docxduane12345678
 
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.docxduane12345678
 
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.docxduane12345678
 

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

Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptSourabh Kumar
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfkaushalkr1407
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfTamralipta Mahavidyalaya
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxricssacare
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationDelapenabediema
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativePeter Windle
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsCol Mukteshwar Prasad
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)rosedainty
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxRaedMohamed3
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchVikramjit Singh
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxJisc
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfVivekanand Anglo Vedic Academy
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 

Recently uploaded (20)

Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 

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.