subject

Assuming the user enters a positive integer n >= 2 and I want to write a program which tells the user if a number is prime or not. What should I replace in the following code with n = int(input("Enter n"))isvalid = Truei = 2while i*i <= n: if n%i == 0: isvalid = False else: isvalid = i += 1 if isvalid: print("n is prime")else: print("n is not prime")

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
question
Computers and Technology, 23.06.2019 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
question
Computers and Technology, 23.06.2019 20:10
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Asecurity policy is a a. set of guidlines b. set of transmission protocols c. written document d. set of rules based on standards and guidelines
Answers: 2
You know the right answer?
Assuming the user enters a positive integer n >= 2 and I want to write a program which tells the...
Questions
question
Geography, 29.07.2020 14:01
question
English, 29.07.2020 14:01
question
English, 29.07.2020 14:01
question
Health, 29.07.2020 14:01
question
Mathematics, 29.07.2020 14:01
Questions on the website: 13722367