Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python program ...no def please Given a list of positive and negative integers, write a Python program to display each positive integer in the list

Python program ...no def please

Given a list of positive and negative integers, write a Python program to display each positive integer in the list that is evenly divisible by 8. Also, print how many of those integers were found.

Sample input/output:

Enter a positive or negative integer (0 to end): 0 Number of positive integers evenly divisible by 8: 0 

Sample input/output:

Enter a positive or negative integer (0 to end): -6 Enter a positive or negative integer (0 to end): -8 Enter a positive or negative integer (0 to end): 6 Enter a positive or negative integer (0 to end): 8 8 is a positive value that is evenly divisible by 8. Enter a positive or negative integer (0 to end): 16 16 is a positive value that is evenly divisible by 8. Enter a positive or negative integer (0 to end): 0 Number of positive integers evenly divisible by 8: 2 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions