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
Jorge is sending a message to Thomas but would like a copy sent to his external email address as well. Jorge does not want Thoma
Rashid [163]

Answer:

cc

Explanation:

its used in formal email addresses

4 0
3 years ago
Read 2 more answers
Peter works on a huge database of numerical figures in a worksheet ranging from cell A1 to cell I50. He has to print the workshe
bekas [8.4K]

Answer:

Landscape or vertical page orientation

Explanation:

In landscape  he can mange the number of cell that are required to print on A4 page size.

On landscape orientation of the page we can add more columns of the sheet. That is the reason, we should choose landscape or horizontal page orientation to adjust all columns on the single page.

8 0
3 years ago
Read 2 more answers
What is the best low end pc recording software​
julsineya [31]

Explanation:

democreator

D3DGear

nvidia shadow play etc

8 0
2 years ago
Read 2 more answers
The following SQL statement contains which type of subquery? SELECT title FROM books WHERE EXISTS (SELECT isbn FROM orderitems W
Rudiy27

Answer:

(a) Correlated.

Explanation:

Correlated subquery :These sub queries reference columns from outer table or uses values from outer query.These sub queries are processed atleast once for every row processed.So because of this reason correlated sub queries can be slow.Since the query in the question also uses value from the outer query so it is a correlated query.

4 0
3 years ago
What enforces the location in which an app can function by tracking the location of the mobile device?
Igoryamba

The correct answer is geo fencing.

<h3>what is geo fencing?</h3>

A geofence is a fictitious geographic boundary that can be entered or exited by a mobile device or RFID tag. Geofencing is a location-based service in which an app or other software programme uses radio frequency identification (RFID), Wi-Fi, GPS, or cellular data to trigger a targeted marketing action (such as a text, email, social media advertisement, or app notification).

There are three ways to use this technology to target customers: geotargeting, geofencing, and beaconing. You can track a consumer's location using GPS, Bluetooth, and beacons.

learn more about geo fencing refer:

brainly.com/question/20317002

#SPJ4

4 0
1 year ago
Other questions:
  • When Aaron was called for an interview at a graphic designing company, his first interview test assessed his creativity and his
    7·2 answers
  • Why is the answer A?
    6·1 answer
  • Is the cell phone changing our views about polite and impolite behavior? For example,
    15·2 answers
  • Write a program that converst the temperature from Celcius to Fahrenheit. The formula is: F (9/5)C+32
    12·2 answers
  • Lures, reels, rods, hooks, baits and nets are common equipment used in what food gathering method?
    15·2 answers
  • Nina is trying to learn more about how computers work. She has repeatedly read that the motherboard is the "brain” of the comput
    7·2 answers
  • Jason is working on a project that requires him to manage a huge amount of data. The spreadsheet he is working on has data relat
    10·1 answer
  • Write down the bit pattern in the fraction of value 1/3 assuming a floating point format that uses Binary Coded Decimal (base 10
    10·1 answer
  • What is a technological advancement that is now being used in tractors throughout America?
    6·2 answers
  • Can anyone help me out with my photography questions?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!