Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block minh364

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
def addition(a, b):
return a + b
import unittest
class Test(unittest.TestCase):
def test_addition(self):
self.assertEqual(addition(1, 1), 2)
self.assertEqual(addition(0, 2), 2)
if __name__ == '__main__':
minh364 /
Created Mar 21, 2019
code which is print prime number using Sieve of Eratosthenes
N = int(input())
prime_flag = [True for x in range(N+1)]
prime_flag[0] = prime_flag[1] = False
n = 2
while n*n <= N:
multiple = n*n
while multiple <= N:
prime_flag[multiple] = False
multiple += n
n += 1
You can’t perform that action at this time.