subject
Computers and Technology, 12.11.2019 22:31 shey89

Write following program using python:

a positive integer greater than 1 is said to be prime if it has no divisors other than 1 and itself. a positive integer greater than 1 is composite if it is not prime.

write a program that asks the user to enter a integer greater than 1, then displays all of the prime numbers that are less than or equal to the number entered. last, create two files. one file will hold all of the prime numbers found. the other file will hold all of the composites found.

your program must maintain two lists. one for prime numbers and another for composite numbers. for every number found to be prime, add it to your prime list. for every number found to be composite, add it to your composite list.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:30
Some of your friends have gotten into the burgeoning field of time-series data mining, in which one looks for patterns in sequences of events that occur over time. purchases at stock exchanges--what’s being bought-- are one source of data with a natural ordering in time. given a long sequence s of such events, your friends want an efficient way to detect certain "patterns" in them--for example, they may want to know if the four events buy yahoo, buy ebay, buy yahoo, buy oracle occur in this sequence s, in order but not necessarily consecutively. they begin with a collection of possible events (e.g., the possible’ transactions) and a sequence s of n of these events. a given event may occur multiple times in s (e.g., yahoo stock may be bought many times in a single sequence s). we will say that a sequence s’ is a subsequence of s if there is a way to delete certain of the events from s so that the remaining events, in order, are equal to the sequence s’. so, for example, the sequence of four events above is a subsequence of the sequence buy amazon, buy yahoo, buy ebay, buy yahoo, buy yahoo, buy oracle their goal is to be able to dream up short sequences and quickly detect whether they are subsequences of s. so this is the problem they pose to you: give an algorithm that takes two sequences of even~s--s’ of length m and s of length n, each possibly containing an event more than once--and decides in time o(m n) whether s’ is a subsequence of s
Answers: 2
question
Computers and Technology, 22.06.2019 10:00
Wich technology can a website use to allow you to listen to a concert live over the internet?
Answers: 3
question
Computers and Technology, 22.06.2019 14:00
What are procedures that keep a data base current
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
You know the right answer?
Write following program using python:

a positive integer greater than 1 is said to be p...
Questions
question
Social Studies, 24.09.2019 16:10
question
English, 24.09.2019 16:10
question
World Languages, 24.09.2019 16:10
Questions on the website: 13722362