1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Goshia [24]
3 years ago
13

Create Python program code that will use a for loop to ask the user to enterfourintegers. Itwillcount how many of the integers a

re divisible by 2. The programwill print each of the 4integers and a message saying whether the integeris even or odd. The code will print the total number of even integers

Computers and Technology
1 answer:
aleksandrvk [35]3 years ago
7 0

Answer:

is_even = 0

int_numbers = []

for n in range(4):

n = int(input('press any four integer numbers')

int_numbers.append(n)

for n in int_numbers:

if n%2==0:

print(n, 'integer is even')

is_even+= 1

else:

print(n, 'integer is odd')

print('Total even numbers =', is_even)

Explanation:

is_even = 0 (initiates a counter to record the number of even integers).

int_numbers creates a list to store the inputs entered by the user.

int(input()) : allows users to enter an integer number

int_numbers.append(n) : adds user input to list list variable created.

n%==2 : checks if entered digit leaves a remainder of 0 when divided by 2; hence an even number

is_even+= 1: counter updates by 1 for every even number confirmed.

You might be interested in
What is an efficiency target? Give an example of setting an efficiency target
Gennadij [26K]

Answer:

Goals help provide our everyday lives with structure, and operate similarly at the institutional level, offering organizations a low cost method of encouraging motivation, communication and accountability. In short, goals help organizations to achieve a variety of ends—including the reduction of energy waste.

Energy efficiency improvement goals, also known as energy efficiency targets, are intended reductions in energy over a specified time frame that have been defined in a SMART manner. Targets are useful because they can encourage decision makers to improve the use of energy in their communities and operations. Moreover, energy efficiency targets can have short or long term timeframes and can be implemented on various scales, ranging from the national level down to individual buildings. Cities should explore both mandatory public sector targets and voluntary private sector targets to forge energy-efficient communities.

4 0
4 years ago
To copy consecutive items, click the first item in the group, hold down _______, and click the last item
Nikitich [7]
C. Shift , you can control click to select one at a time
7 0
3 years ago
Read 2 more answers
7. A patent is an example of a rare and valuable resource. Indicate whether the statement is true or false and also justify it.
mamaluj [8]

Answer:

True.

Explanation:

Patent can be defined as the exclusive or sole right granted to an inventor by a sovereign authority such as a government, which enables him or her to manufacture, use, or sell an invention for a specific period of time.

Generally, patents are used on innovation for products that are manufactured through the application of various technologies.

Basically, the three (3) main ways to protect an intellectual property is to employ the use of trademarks, copyright and patents.

Hence, a patent is an example of a rare and valuable resource because it protects the intellectual property of an individual or business entity and as such serves as a medium for gaining royalties or valuable economic benefits.

7 0
3 years ago
Which of the following is a function of the slip yoke used on a driveshaft?
Harrizon [31]
It has to be all of the above because A and B are both true.

<span>It allows movement between the suspension as it reacts to the road surface, which also allows the driveshaft to change length to configure to the road.</span>

7 0
4 years ago
Write a program to enter 30 integer numbers into an array and display​
Rama09 [41]

Answer:

i764

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Gaetan has attempted to enter the passcode for his mobile device but keeps entering the wrong code. Now he is asked to enter a s
    12·1 answer
  • Please what's the answer to this
    14·1 answer
  • The first thing you must consider in any type of communication is ______.
    9·2 answers
  • List three things that sally sue can improve
    12·2 answers
  • Microsoft’s SharePoint server product dramatically altered the content and records management (RM) markets. Crocker (2015), edit
    6·1 answer
  • You are network administrator for an Active Directory forest with a single domain. Then network has three sites with one domain
    12·1 answer
  • 1. Write the syntax of the following HTML commands by using any one attribute
    6·2 answers
  • Fill in the blanks : To store 3 character a computer occupies...................bytes memory space​
    8·2 answers
  • What is the way to discover requirments for software projects ?
    14·1 answer
  • What's good computing?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!