Write a python code to enter two no.s from user and display the sum of all composite no.s between them.
Answers
Answered by
1
ıllıllı ʜᴇʀᴇ ɪs ʏᴏᴜʀ ᴀɴsᴡᴇʀ ıllıllı
To understand this example, you should have the knowledge of following Python programming topics:
Python if...else Statement
Python for Loop
Python break and continue
A positive integer greater than 1 which has no other factors except 1 and the number itself is called a prime number.
2, 3, 5, 7 etc. are prime numbers as they do not have any other factors. But 6 is not prime (it is composite) since, 2 x 3 = 6.
ᴇʜsᴀss ★
Attachments:
Ketan1703:
sorry my demand was of sum of all 'composite no.' between given range
Similar questions