We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

User:Cordership/Python programs

From Esolang
Jump to navigation Jump to search

Primes from 1 to 100:

print(2)
print(3)
print(5)
print(7)
for x in range(1, 101):
    if x % 2 != 0:
        if x % 3 != 0:
            if x % 5 != 0:
                if x % 7 != 0:
                    print(x)
                else:
                    pass
            else:
                pass
        else:
            pass
    else:
        pass

Looping counter:

n=1
for i in range(0, 100):
    print("*"*n)
    n+=1