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
IRISSAK [1]
3 years ago
12

The Fibonacci sequence starts 1, 1, 2, 3, 5, 8, .. . . Each number in the se-quence (after the first two) is the sum of the prev

ious two. Write a pro-gram that computes and outputs the nth Fibonacci number, where n is avalue entered by the user.
Computers and Technology
1 answer:
dem82 [27]3 years ago
5 0

Answer:

value=int(input("Enter the number up-to the user wants the Fibonacci series: "))

a=0

b=1

c=1

for x in range(value):

   print(c,end=" ")

   c=a+b

   a=b

   b=c

Output :

  • If the user input 5, then the output is "1 1 2 3 5".
  • If the user input 10, then the output is "1 1 2 3 5 8 13 21 34 55".

Explanation:

  • The above defined a python program which is used for the Fibonacci series.
  • The first line of the program is used to instruct the user and take the input from the user.
  • Then the for loop executes up-to that range value.
  • Then in the for-loop, the two variable needs to store the current value and previous value which is used to give the series after addition.
You might be interested in
What is the first step in the exchange between a web browser and a database?
bezimeni [28]
<span>The client browser requests a page from a Web server.</span>
3 0
3 years ago
What characteristics need to be exhibited by an organisation to improve its software process?
aalyn [17]

Answer:  Defined , Controllable ,  Measured , Effective ,  Institutionalized are some of the characteristics needed to be exhibited by an organisation to improve its software process

Explanation:

Software process improvement(SPI)  helps in achieving goals of software products for an organization. Some of its characteristics are Defined , Controllable ,  Measured , Effective ,  Institutionalized.

It goals must be defined, and must also be controlled and it performance must be measured at regular intervals and any reforms carried out to achieve goals must be effective. Lastly it should implement all goals in an institutional framework to be followed by every one in the organization.

6 0
3 years ago
write a java program using a do while loop to prompt the user to enter a password. The user should be prompted to enter the pass
Alex787 [66]
We can import Scanner from Java.utils.Scanner to pull in text entered in the console.

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String password = "";
do {
System.out.print("Enter your password: ");
password = sc.nextLine();
if(!password.equals("pals") {
System.out.println(\nIncorrect Password. Try again.");
}
} while(!password.equals("pals");
3 0
3 years ago
• The technical support department at your company has informed you that you will be receiving a new computer within the next we
alexdok [17]
1) back up your data
2) delete any personal information
3) clear cookies, browsing data, and saved passwords
4) restore any settings you may have changed to original settings
6 0
3 years ago
Programs that do the same thing every time they run are called...
Misha Larkins [42]

Answer:

predictable

Explanation:

because it repeat itself all time

6 0
2 years ago
Other questions:
  • A Color class has a method getColorName that returns a string corresponding to the common name for the color, e.g., yellow, blue
    11·1 answer
  • Write a main method that prompts the user for an integer between 1 &amp; 10 (inclusive). If the user enters an invalid number, p
    10·1 answer
  • What type of topology gives you a direct connection between two routers so that there is one communication path?
    14·1 answer
  • What can be done to improve the security of business uses of the Internet? Give several examples of ecurity measures and technol
    9·1 answer
  • Suppose as a computer programmer, you have been assigned a task to develop a program to store the sorted data in ascending order
    9·1 answer
  • Benjamin recently issued new mobile phones to the marketing team at his company. Each phone can transmit encrypted information f
    8·1 answer
  • The _device provides a means of communication between a computer and outer world.​
    14·1 answer
  • Describe markings on a road that indicate that it is safe to pass.
    10·1 answer
  • A(n) __________ prevents outsiders from accessing corporate information the user does not want others to see.
    9·1 answer
  • What is the output by the code system.out.print(8-4+2);
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!