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
I need some helpppppppppopoppppppppp
Yuri [45]

Answer:

Adding images: picture drawing box and insert tab

Formatting images: crop and picture styles

Explanation:

picture drawing box and insert tab would be options to add images

formatting (or editing) the images would be crop, and picture styles

4 0
3 years ago
Read 2 more answers
true or false if you type too much text on a powerpoint slide, the additional text is added to a second slide
Nady [450]
True I've had it happen alot
3 0
3 years ago
Read 2 more answers
What are the documents involved in E payment​
trapecia [35]

Answer:

Registration, Placing an order, and, Payment.

Explanation:

4 0
3 years ago
Consider the following base and derived class declarations: class BaseClass { public: void BaseAlpha(); private: void BaseBeta()
Alina [70]

Answer:

a) Baseclass - baseField

DerivedClass - derivedField

b) BaseClass - baseField

DerivedClass - derivedField

c) BaseClass - BaseBeta(), BaseAlpha()

DerivedClass - BaseAlpha(), DerivedAlpha(), DerivedBeta()

d) BaseClass - BaseAlpha()

DerivedClass - BaseAlpha(), DerivedAlpha(), DerivedBeta()

Explanation:

a) Since, private members of a class cannot be inherited, that is why, DerivedClass has only one private data member.

b) Member function of a class can invoke private data variables of the class, so, they can refer to their private members on their own but DerivedClass has no access to BaseClass's private members.  

c) Every member function of a class can invoke every other member function of that class, but DerivedClass's member function cannot invoke BaseClass's private member functions.

d) Object of a class has no access to private members of a class, that is why they can invoke only public member functions of the class.

8 0
3 years ago
Which ipv6 router message is sent via multicast with a scope of link-local with the expectation that all local routers will iden
Artyom0805 [142]
The Answer is Router <span> Solicitation. </span>
 This is because RS is used to determine which routers are present on a specific sub net by sending a message asking for a router advertisement that provides details about a specific router.
3 0
4 years ago
Other questions:
  • When a chart is selected, numerous customization options can be found on which Chart Tools tabs?
    11·2 answers
  • Describe the "Mister Splashy Pants" campaign. How did it start? What happened?
    7·2 answers
  • An administrator has been working within an organization for over 10 years. He has moved between different IT divisions within t
    8·1 answer
  • If you owned an online clothing company and you only had the resources to run one social media campaign, which platform would yo
    14·1 answer
  • __________ is the process by which previously distinct technologies come to share tasks and resources.
    10·1 answer
  • When the atmosphere has too much carbon dioxide in it, the oceans absorb some of it to achieve a new balance. This is an example
    9·2 answers
  • What is a header row?
    8·1 answer
  • THIS IS FOR MY FINAL PLEASE HELP
    6·1 answer
  • Which of the following can help organize your email messages? Select all that apply.
    13·2 answers
  • Five varieties of software​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!