From d50c77896cf5039fcf6cf4719e418f44508aa87a Mon Sep 17 00:00:00 2001 From: SAM <73647831+samhackathon@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:30:40 +0500 Subject: [PATCH] Delete prime.py --- prime.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 prime.py diff --git a/prime.py b/prime.py deleted file mode 100644 index 7901b9bdc7b..00000000000 --- a/prime.py +++ /dev/null @@ -1,26 +0,0 @@ -# Program to check if a number is prime or not - -num = 29 - -# To take input from the user -#num = int(input("Enter a number: ")) - -# define a flag variable -flag = False - -if num == 1: - print(num, "is not a prime number") -elif num > 1: - # check for factors - for i in range(2, num): - if (num % i) == 0: - # if factor is found, set flag to True - flag = True - # break out of loop - break - - # check if flag is True - if flag: - print(num, "is not a prime number") - else: - print(num, "is a prime number")