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
Inessa05 [86]
3 years ago
13

In python please!! Write the definition of a function named countPos that needs integer values from standard input until there a

re none left and returns the number that are positive. The function must not use a loop of any kind.
Computers and Technology
1 answer:
jek_recluse [69]3 years ago
8 0

Answer:

Explanation:

The following code is written in Python it doesn't use any loops, instead it uses a recursive function in order to continue asking the user for the inputs and count the number of positive values. If anything other than a number is passed it automatically ends the program.

def countPos(number=input("Enter number: "), counter=0):

   try:

       number = int(number)

       if number > 0:

           counter += 1

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

       else:

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

   except:

       print(counter)

       print("Program Finished")

countPos()

You might be interested in
Range of motion definition
svet-max [94.6K]
Range of Motion:
Range of Motion or ROM is an exercise machine when a person has been injured in some way, most times the doctor's advises the patients to exercise and stretch the back back muscles. 
<span />
7 0
3 years ago
What is (12.2a + 9.7b) – (18.1b – 0.2a) – (6.7a + 6.8b), simplified?
Inga [223]
The answer should be 5.7a - 15.2b
8 0
3 years ago
What refers to a metal combined with one or more other elements
alexira [117]
The correct answer is an Alloy.
8 0
3 years ago
Your company is experiencing an increase in malware incidents. Your manager is asking for advice on how best to verify that comp
dexar [7]

Answer:

c.

Explanation:

Based on the information provided within the question it can be said that the best option in this scenario would be to implement an endpoint management server appliance. This is a software or dedicated appliance that is used in order to discover, manage, and control any and all computer devices that are trying to access the corporate network. This allows you to remove individuals as well as administrative rights from those trying to connect or that are already connected.

5 0
4 years ago
Make the correct match.
faltersainse [42]
<span>1. E 2. B 3. D 4. F 5. C 6. A Let's go about solving this problem in a process of elimination. So I'll be making each match in the easiest (for me) order. Initially I'm not sure about 1 & 2. But the match for #3 is rather obvious. So 3. Blending non-related clips and images to make a new video. This is a "D. Mashup" The next obvious answer is for #6. That is 6. Everything that happens to the video and audio after the footage has been shot. This is "A. Post production" Now of the remaining 4 choices, "Final Cut Pro" sounds like an actual program. And there's only 1 option that's asking for a specific program. So we have 2. Most popular post-production editing package by Apple Answer "B. Final Cut Pro" This leaves us with 3 options "C. Non-linear editing", "E. AVID", and "F. Timeline" Of these 3, only "F. Timeline" sounds list an element in the interface of a video editing package. So we have 4. An element in the interface of editing software Answer "F. Timeline" Now a quick google search reveals that "AVID" is a software company that makes video editing software. So 1. Company that makes high-end post-production software. Answer "E. AVID" And we're left with 5. Transferring film onto Beta, digitizing it to the computer, and editing it Answer "C. Non-linear editing" Now the only questionable choice is Non-linear editing (NLE) for #5. So doing a quick google search and I see that #5 over specified the task. The key characteristic of NLE is having the video and audio in digital form that can be readily accessed via a computer. And #5 does qualify for that task. So here's the final answers 1. E 2. B 3. D 4. F 5. C 6. A</span>
6 0
3 years ago
Other questions:
  • Which one of the following is NOT a type of reference method that uses a terminal digit system? 1) Account payables 2) Medical r
    11·1 answer
  • Which of the following is not a feature of Hootsuite?
    14·1 answer
  • The web development team is having difficulty connecting by ssh to your local web server, and you notice the proper rule is miss
    8·1 answer
  • _____ is an effort by an employee to attract attention to a negligent, illegal, unethical, abusive, or dangerous act by a compan
    8·1 answer
  • Website hosting servers have their own unique IP address, what does this address consist of?
    8·1 answer
  • ____________ facilitates the processes that help an organization function by applying information and communication technologies
    5·1 answer
  • Which of the following is the easiest way for visitors to learn about a business while visiting a website?
    13·1 answer
  • For this project, you have to write 3 functions. C++
    13·1 answer
  • WNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOW
    11·1 answer
  • Draw a flowchart and write the algorithm to find even number between 1 to 50​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!