Question: Write a Python program that takes in as input a number from the user and prints the following output based on the value of
Write a Python program that takes in as input a number from the user and prints the following output based on the value of num. You can assume that num will always be an integer. print "zero" if num is O print "prime" if (num is greater than 1 and is a prime number. A prime number is a number with only two factors: 1 and the number itself, e.g. 2, 3, 5, ... print "not a prime" if num) is greater than 1 and is not a prime number, e.g. 8, 15, 18,.... print "negative" if num is less than 0 Edit View Insert Format Tools Table Paragraph 12pt BIUA 2 T
Step by Step Solution
There are 3 Steps involved in it
The task youve presented is to write a Python program that cla... View full answer
Get step-by-step solutions from verified subject matter experts
