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
julsineya [31]
3 years ago
5

Assume the availability of a function called printStars. The function receives an int argument. If the argument is positive, the

function prints (to standard output) the given number of asterisks. Thus, if printStars(8) is called, ******** (8 asterisks) will be printed. Assume further that the variable starCount has been declared and initialized to a some integer, possibly negative or zero. Write some code that does nothing if starCount is not positive but that otherwise prints starCount asterisks to standard output by: first printing a single asterisk (and no other characters) then calls printStars to print the remaining asterisks.
Computers and Technology
1 answer:
uranmaximum [27]3 years ago
8 0

Answer:

The python program is given with appropriate comments

Explanation:

#Implementation of printStars function

def printStars(n):

  #check if n is greater than 0

  if n>0:

      for i in range(n):

          print ('*', end="")

#Declare starCount and initialize some negative integer

starCount = -8

if starCount>0:

   print ('*', end="")

   printStars(starCount-1)

You might be interested in
Plz help
Rama09 [41]

Answer:

name

Explanation:

name =

is an assignment to the variable called 'name'.

5 0
3 years ago
Read 2 more answers
The _____ unit is the preferred style unit for web page text because it makes it easy to develop pages in which different page e
cluponka [151]
Em The answer that you are looking for is (em)
6 0
4 years ago
Read 2 more answers
How can I put my keyboard back​
zvonat [6]

Flip the laptop over, take off the screws that hold the frame together. Flip it back, take off the top plate. Then, slide the keyboard back in. Replace the frame, and then rescrew the screws. Replace the back side after.

~

8 0
3 years ago
Which is an example of an active visual interface? a display indicating the amount of ammunition for the currently equipped weap
AnnyKZ [126]

Hello.

The answer is : weapon a display indicating an object that can be explored by clicking on it a display indicating the types of weapons available a display indicating keys collected

An active visual interface is one in which a player can click to interact with the game mechanics.

have  a nice day

7 0
3 years ago
Read 2 more answers
What is the missing line?
Marta_Voda [28]

Answer: i think it is >>> myDeque.clear()

5 0
3 years ago
Other questions:
  • In addition to not parking where signs prohibit it, you should never park __________________.
    12·1 answer
  • A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-lif
    10·1 answer
  • Your computer is crashing on a regular basis. Which of the following is an operation available to the user that should help rese
    6·2 answers
  • Which implementation has the worst time complexity?
    5·1 answer
  • 8. A pattern of being late for work or for appointments is usually
    12·1 answer
  • We will pass in a value N. Write a program that outputs the complete Fibonacci sequence for N iterations. Important: If N is 0,
    13·1 answer
  • The option to publish a file as a blog post is located in the____options on the File tab.
    8·1 answer
  • What is the preferences of occupation in ones life?
    14·1 answer
  • Anyone has any ideas for a gaming setup i can buy for christmas. Something with high framing rates (monitor included) for about
    15·1 answer
  • How do mark somebody as brainliest??
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!