Warning
This page is located in archive. Go to the latest version of this course pages.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
courses:pri-bootcamp:solutions [2019/09/19 13:58]
kubikji2
courses:pri-bootcamp:solutions [2019/09/19 14:07]
kubikji2
Line 1642: Line 1642:
  
 <code python> <code python>
-### Proposed by mareddan ### +Jirka 
 def fibonacci(x):​ def fibonacci(x):​
  if x <= 0:  if x <= 0:
Line 1650: Line 1649:
  return 1  return 1
  return fibonacci(x - 1) + fibonacci(x - 2)  return fibonacci(x - 1) + fibonacci(x - 2)
 + 
  
- +number ​int(input("Zadej poradi ve fibonacciho posloupnosti")) 
-if __name__ == "__main__"+result = fibonacci(number) 
- number = 8 +print("​Vysledek je ", result)
- result = fibonacci(number) +
- print(str(number) + "th fibonacci number is:", result)+
 </​code>​ </​code>​
  
courses/pri-bootcamp/solutions.txt · Last modified: 2019/09/19 14:07 by kubikji2