- Write a python program to prompt user input then check if the number even or odd, this step will continue until user enter -1 - Write a python program to prompt the user to enter a number then check the number if divisible by 7 or not, this step will continue until user enter -1 - Write a python program to summing up the odd number between 1 and 200 - Write a python program to summing up the even number between 1 and 200 - Write a python program to summing up the number divisible by 10 between 1 and 200 - Write a python program to prompt user input then check if the number is prime or not
Added by Mario S.
Close
Step 1
Write a python program to prompt user input then check if the number even or odd this step will continue until user enter -1 ``` while True: num = int(input("Enter a number (-1 to exit): ")) if num == -1: break if num % 2 == 0: Show more…
Show all steps
Your feedback will help us improve your experience
Vysakh M and 66 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a Python program that asks the user for one number and tells if it is a prime number or not. [The input number has to be an INTEGER] Prime Number: If a number has only two divisors (1 and itself), then it is prime. If it is divisible by more numbers, then it is not prime. Hint: Use the divisor count from task 16. Example 1: Input: Output: 11 is a prime number Explanation: 11 has only divisors: 1 and 11. Example 2: Input: Output: is not a prime number Explanation: It has divisors: 1, 2, 3, and 6.
Liam H.
Write a Python program that displays all integers between 1 and 100 that are divisible by 5 or 7, but not both. Write it using While and for.
Shaik D.
Write a program that will ask a user for how many numbers they would like to check. Then, using a for loop, prompt the user for a number and output if that number is even or odd. Continue doing this as many times as the user indicated. Once the loop ends, output how many even numbers were entered and how many odd numbers were entered.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD