Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please write this program in python . Write a program (in any language) which reads in numbers from the keyboard, one per line, until it
please write this program in python .
Write a program (in any language) which reads in numbers from the keyboard, one per line, until it gets a zero. For each number, print out whether it is prime. After the zero is read, print out in this order): 1. the number of values entered, 2. how many were prime, 3. how many were not prime (do not count the zero), 4. the highest prime number, 5. the lowest prime number. For this program, a prime number is any whole number greater than or equal to 2 that is not divisible by any values other than the number 1 and itself. Python 3.8.1 Shell Python 3.8.1 (v3.8.1: 1b293b6006, Dec 18 2019, 14:08:53) (Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license()" for more information. >>> ========== RESTART: /Users/kilroy/Rowan/Class/LabTech/Primes/prims.py ==== 4231 4231 is prime 9 9 is not prime 17 w 17 is prime 3 3 is prime 12 12 is not prime 0 # values: 5 Primes: 3 Non-primes: 2 Max prime: 4231 Min prime: 3 >>>Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started