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
scoundrel [369]
3 years ago
12

2.8 Code Practice: Question 1

Computers and Technology
1 answer:
yuradex [85]3 years ago
8 0

Answer:

Explanation:

First take the input of the numbers:

x = int(input("Enter the number of elements to be in the list:"))

b=[ ]

for i in range(0,x):

a=int(input("Element: "))

b.append(a)

c=[ ]

d=[ ]

for i in b:

if(i%2==0):

c.append(i)

else:

d.append(i)

c.sort()

d.sort()

count1=0

count2=0

for k in c:

count1=count1+1

for j in d:

count2=count2+1

print("Largest even number:",c[count1-1])

print("Largest odd number",d[count2-1])

You might be interested in
Which function would you use to make sure all names are prepared for a mailing label? TODAY UPPER PROPER LOWER
Aleonysh [2.5K]

Answer:

Proper.

Explanation:

5 0
2 years ago
On tool hackers use to get sensitive information from victims is/are:
Feliz [49]
Pretty sure it’s keyloggers because it’s the only one that makes sense to me but I’m not 100% sure on that one
5 0
3 years ago
Read 2 more answers
Please help me on this coding problem :)
Vesnalui [34]

Answer:

a=4 , b=1

Explanation:

I'm not a computer science major at all but I think I can help you with this code.

Our program wants us to add 2 to a get new a value while also subtracting 1 from b value to obtain new b value. We we want to for for as long b is not 0 and a/b is nonnegative.

One round we get:

New a=0+2=2

New b=3-1=2

Let's see if we can go another round:

New a=2+2=4

New b=2-1=1

We can't go another round because b would be negative while a is positive which would make a/b negative. So our loop stops at this 2nd round.

a=4 , b=1

Other notes:

2nd choice makes no sense because a is always going to increase because of the addition on a and b was going to decrease because of the subtraction on it.

Third choice makes no sense because a/b doesn't even exist.

Fourth choice a/b is negative not nonnegative.

4 0
3 years ago
What type of software is responsible for managing processor time and memory allocation?
yKpoI14uk [10]

Answer: Operating system

Explanation:

 The operating system is the type of software that are responsible for manage the processor time and also the memory allocation in the system. The operating system mainly deals with the processor time by scheduling the processor work done in the system.

The OS mainly control the system and then schedule the execution of various types of function by the central processing system (CPU). It also control the memory allocation in the system.

4 0
3 years ago
En la historia del Computador porque se caracteriza la primera generación? *
Nadusha1986 [10]

D. Por el uso de tubos de vacio.

8 0
3 years ago
Other questions:
  • What is the most effect way to include space after each paragraph
    14·1 answer
  • Karen has opened a new business and is using Google Display Ads to build awareness of her new products. How does Google Display
    6·1 answer
  • What is considered necessary to establish OSHA
    5·1 answer
  • Multiply 1101 and 0110 in binary.
    10·1 answer
  • Suppose there are two links between a source and a destination. The first link has transmission rate 100 Mbps and the second lin
    12·1 answer
  • PLEASE HELP ASAP!!
    11·2 answers
  • 2. What is data redundancy?
    14·1 answer
  • Use the Law of Sines to solve the triangle. Round your answers to two decimal places.
    6·1 answer
  • Excel files have a default extension of ?
    12·1 answer
  • How can you create a messages to look like an IMessage?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!