ilsamoano

Results 28 comments of ilsamoano

``` # Test case for the algorithm def exponentiation_test(base_number, exponent, expected): if exponentiation(base_number, exponent)== expected: return True else: return False #code def exponentiation(base_number, exponent): if exponent == 0: return 1...

``` def test_stack_from_list(input_list, expected): result = stack_from_list(input_list) if expected == result: return True else: return False from collections import deque def stack_from_list(input_list): output_stack = deque() for item in input_list: output_stack.append(item)...

mordor_set = set() #used set() to create a new set mordor_set.add("Bilbo") #added new element to the set mordor_set.add("Frodo") #added new element to the set mordor_set.add("Sam") #added new element to the...

``` #test def test_myrange(n,expected): result= myrange(n) if result == expected: return True else: return False #code def myrange(n): newlist = [] while n >0: n = n - 1 newlist.append(n)...

``` mordor_set = set() #used set() to create a new set mordor_set.add("Bilbo") #added new element to the set mordor_set.add("Frodo") #added new element to the set mordor_set.add("Sam") #added new element to...

``` A = "Peroni" B = "HTML" Def = "Peroni, S., Osborne, F., Di Iorio, A., Nuzzolese, A. G., Poggi, F., Vitali, F., Motta, E. (2017). Research Articles in Simplified...

Hi Prof, thanks for the heads up. I’ve tried to sub “Peroni” with “Pippo”, but my code still gives 2 as a result, not 0 and neither 1. ``` A...

![3 issue flowchart 1](https://user-images.githubusercontent.com/44072915/48616225-3f85d580-e993-11e8-983f-419fe55f4ba8.png) ![3 issue flowchart 2](https://user-images.githubusercontent.com/44072915/48616232-43b1f300-e993-11e8-8ff8-44281479a2d6.png)

![2 issue flowchart](https://user-images.githubusercontent.com/44072915/48613450-05650580-e98c-11e8-9576-9019f808fe2f.png)

The function for calculating the nt​ h Fibonacci number takes as input an integer “n”. If “n” is less than or equal to 0, then 0 is returned as result....