0
If i input other than prime like 6 its Output error instead false..why..?help me plz
def is_prime(num): return [i for i in range(2,num) if num % i ==0]==[] def get_prime(): num=2 while num < 10: if is_prime(num): yield num num+=1 yield [i for i in get_prime()] any_vlaue=int(input()) print(any_vlaue in get_prime())
2 ответов
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 can u give a little explaintion of why u used 'd', 'append' & why yield later from num+=1...plz
..