This will raise a name error exception and won’t run bc num is not defined.
That aside, can you estimate how long this code will take to run as n changes size? Eg if n is 10x larger will it take 10x longer to run? That estimate is your time complexity estimate.
2
u/13ass13ass Mar 23 '21
This will raise a name error exception and won’t run bc num is not defined.
That aside, can you estimate how long this code will take to run as n changes size? Eg if n is 10x larger will it take 10x longer to run? That estimate is your time complexity estimate.