user
Write code to display all the prime numbers from 1 to 100

Answer:
assistant
# Python program to display all the prime numbers from 1 to 100
 
print("All the prime numbers between 1 to 100 are:")
for num in range(1,101):
    # prime numbers are greater than 1
    if num > 1:
        for i in range(2,num):
            if (num % i) == 0:
                break
        else:
            print(num)