Sum the Ino-Numbers!

Computer Science Level pending

Look at the following code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
def In_no(n):
    if n < n**2:
        return n**2 - n

    if n >  n**2:
        if n > n / 2:
            return n + n /2
        elif n < n /2 :
            return 2 * n
        elif n + 1 < n:
            return abs(n)
        else:
            return n + 2 - n*2 + n /2

    return n - n**2 / (n + 1)

Sum = 0

_loc1_ = 0
while _loc1_ < 11:
    _loc2_ = 1
    while _loc2_ < 11:
        Sum += In_no(_loc1_ / float(_loc2_))
        _loc2_ += 1

    _loc1_ += 1
print round(Sum)

What does the above output?


The answer is 483.0.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

0 solutions

No explanations have been posted yet. Check back later!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...