Python Forum
[split] help a brother am so new
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] help a brother am so new
#4
@jefsummers: Thank You very Much But I had to change the starting as Fibonacci starts with "1".

Also I am new to python so I agree that it was kinda screwed up

The final code is:

fibLimit= int(input('Enter how many Fibonacci numbers you would like to print = '))

fbNext = [1,1]

for i in range(fibLimit):
    if i < 2:
        print(fbNext[i])
    else:
        fbNext.append(fbNext[i-2] + fbNext[i - 1])
        print(fbNext[i])
Reply


Messages In This Thread
[split] help a brother am so new - by MohsinCoding - Feb-13-2020, 12:42 PM
RE: [split] help a brother am so new - by Larz60+ - Feb-13-2020, 06:09 PM
RE: [split] help a brother am so new - by MohsinCoding - Feb-14-2020, 12:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  help a brother am so new manimani 5 2,361 Feb-14-2020, 11:22 PM
Last Post: michael1789

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020