Dimo4ka Posted January 9, 2023 Posted January 9, 2023 # "for" loop y = 0 for i in range(0, 5024, 1): y += 1 if y == 5023: break print(y) # 5023 1
Dimo4ka Posted January 9, 2023 Posted January 9, 2023 # count_number random generator import random def counting_vol_2(): while True: count = random.randint(1, 10000) if count == 5026: return count print(counting_vol_2()) # 5026
Dimo4ka Posted January 9, 2023 Posted January 9, 2023 x = (len([i for i in range(1, 15085) if i % 3 == 0])) print(x) # 5028
SlitfaceJR Posted January 10, 2023 Posted January 10, 2023 (edited) 5030 Edited January 10, 2023 by SlitfaceJR miscount
Recommended Posts