Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using loop to write a program that displays the following pattern (20 pts): The Fibonacci sequence is a series of numbers that the next number

Using loop to write a program that displays the following pattern (20 pts):

The Fibonacci sequence is a series of numbers that the next number is found by adding up the two numbers before it. The first two numbers are 0 and 1.

For example, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34. The next number in this series is 21+34 = 55. Write a program asks users to Enter a positive value n, and then display the sum up of Fibonacci sequence up

to n terms. Requirement:if user entered a non-positive number, then asks user to re-enter the value. (20 pts)

Submission Instructions:

Write all the code in one module (in one .py file), and save it asLastname_Firstname_hw3.py, e.g., JohnAdam's file name should beAdam_John_hw3.py.

Submit it through Blackboard -> Course Material -> Unit 4 -> Homework_3

Youneed to provide some comments for your codes and follow the variable's naming rules and conventions.

Do not copy and paste other's code.(Blackboard provides a plagiarism prevention tool that detects unoriginal content.)

1

 * ** *** **** ***** 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

What is the special role of energy in economic systems?

Answered: 1 week ago