Quick actions

cmd+k|ctrl+k

Navigation

Languages

Bilangan Prima

Snippet info

Language

Python

Visibility

public

Author

hilmi-am

Created

2020-06-23T13:44:31Z

Updated

2020-06-23T13:44:31Z

for x in range(5, 20):
    for y in(2, x):
        if x % y == 0:
            print(x, 'equals', y, '*', x/y)
            break
        else:
            # loop fell through without finding a factor
            print(x, 'Adalah bilangan prima')
        
  
INFO