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
Luba_88 [7]
4 years ago
7

Write programs that read a sequence of integer inputs and print a. The smallest and largest of the inputs. b. The number of even

and odd inputs. c. Cumulative totals. For example, if the input is 1 7 2 9, the program should print 1 8 10 19. d. All adjacent duplicates. For example, if the input is 1 3 3 4 5 5 6 6 2, the program should print 3 5 6.
Computers and Technology
1 answer:
Pavlova-9 [17]4 years ago
4 0

Answer:

def find(lst):

   max = lst[0]

   min = lst[0]

 

   total_even = 0

   total_odd = 0

   for x in lst:

       if(max < x):

           max = x

       if(min > x):

           min = x

       if(x%2 == 0):

           total_even += 1

       else:

           total_odd += 1

   print("Maximum = ", max)

   print("Minimum = ", min)

   print("total even =", total_even)

   print("total odd =", total_odd)

   print("total: ",end="")

   temp = 0

   for x in lst:

       temp += x

       print(temp, end=" ")

   pre = lst[0]

   i = 1

   print("\n Close duplicates: ",end="")

   while i<len(lst):

       flag = False

       while(pre == lst[i] and i<len(lst)):

           pre = lst[i]

           i += 1

           flag = True

       if(flag):

           print(pre,end=" ")

       pre = lst[i]

       i += 1

   print("\n\n\n")

find([1, 3, 3, 4, 5, 5, 6, 6, 6, 2])

find([1, 7, 2, 9])

Explanation:

  • Check if a number is even or odd by taking a mod with 2.
  • Display all the counts of even, odd, maximum, minimum numbers.
  • Run a while loop until pre == lst[i] and i<len(lst) and mark the flag as True.
  • Call the find function.
You might be interested in
BRAINLIEST You have a small company and want to keep your costs low, but it is important your employees share data. Which networ
solmaris [256]

Answer:Peer-to-peer

Explanation: I hope this helps

5 0
3 years ago
Read 2 more answers
What controls network connectivity such as Wi-Fi and the GPS locator in a mobile device?
MakcuM [25]

Answer:

There are hybrid system that consist of WiFi, GPS, GSM and IP address to locate the mobile devices.

Explanation:

In Cellular phone communication, hybrid technique is used to locate to find the locations. It consist of WiFi, GSM, GPS and IP addresses. GPS technology is used with satellite communication. Location has been sent from satellite to the mobile network with the help of Google maps. There are few other techniques used to such as GSM based techniques that is used by the help of radio signals strength to find the location of the device. This technique is helpful in the areas where the many communication tower are there to locate the signal strength in the area of the mobile device. WiFi also used to locate the mobile device with the help of IP addresses.

In mobile phones, different combinations of all above technologies used to provide the network connectivity such as WiFi and GPS locator in the mobile Phone.  This is called Cellular locating technology.

5 0
3 years ago
Draw the flowchart to calculate the area of the rectangle 50m length and width 30m.​
marta [7]

Answer:

---- ----

Explanation:

1) Start

2) Rectangle: Read Length and Width.

3) Calculate

4) Print (Calculate)

8 0
3 years ago
Which of the three is not a popular cloud suite or online office suite?
SIZIF [17.4K]
C. Thinksmart - thinksmart only sells products and softwares of their own. Thinksmart is a online selling company that sells moslty softwares on their domain. Think smart is not a popular cloud suite or an online office suite. So the answer to your question is C.
3 0
4 years ago
Sophisticated modeling software is helping international researchers (1 point) create more intricate screenplays and movie scrip
tatiyna

Answer: Increase the pace of research in finding and producing vaccines.

Explanation: The modelling software is the software that is used by the international researchers for the purpose of the researching about the vaccines. There are diseases which still don't have any vaccines and they create serious health conditions.

So, researchers are investigating and trying to develop the vaccines with increasing pace.Other options are incorrect because researchers are not looking for the movie scripts, marketing products and evidences.

8 0
4 years ago
Other questions:
  • Let's say you want to insert a photo of the Microsoft PowerPoint Ribbon to put into your presentation. Which of these should you
    6·1 answer
  • How can you tell that a rolling soccer ball is in motion
    5·1 answer
  • What is Administrator windows 10
    8·1 answer
  • Which of the following does not illustrate the survey method of choosing a speech topic?
    6·2 answers
  • A ______ is a personal computer which stays in one location (e.g. office) due to its larger form factor.
    5·1 answer
  • What is not soured of income
    6·1 answer
  • Which type of operating system is usually used in personal computers
    13·1 answer
  • Do you see traffic flowing from the internet into your system or from your network to the internet? explain why or why not:
    6·1 answer
  • Many contemporary languages allow two kinds of comments: one in which delimiters are used on both ends (multiple-line comments),
    7·1 answer
  • (25 POINTS) Some applications work on all devices while others work on some devices. True or False?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!