I want the code to show the available prime numbers, the number of prime numbers and the sum of all prime numbers in python

start = int(input("Enter the starting range: "))  
end = int(input("Enter the end range: "))  
print ("Prime numbers in the range", start, "to", end)
for i in range(start, end+1):
    flag = 0
    for j in range(2, i):
        if (i % j == 0):
            flag = 1
            break

    if (flag == 0):
        print (i, end = ' ')