Advertisement
k1alo

Prostoe

Nov 10th, 2023
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  2. for i in list:
  3.     rg = 0
  4.     for k in range(1, i+1):
  5.         if i % k == 0:
  6.             rg += 1
  7.     if rg == 2:
  8.         print(f"Это число простое: {i}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement