Computer Science, asked by aribafatima447, 2 days ago

write a program to display the message "Happy Birthday" on screen for 15 times​

Answers

Answered by Anonymous
6

A Python Program

As we are not given/mentioned in the Question only by which programming language we write the required program, therefore here we use python program to calculate the volume of sphere.

Let us take a look at what we need to do in this program.

In this program, we show how to print out "Happy Birthday" on screen for 15 times.

So, basically, to do this, we need to use a for loop with the keyword range in the statement.

Using this method, we can easily print out the "Happy Birthday" for 15 times by specifying that 15 number in the \tt{range()} function.

Below we print out the "Happy Birthday" on screen for 15 times.

for i in range(15):

      print("Happy Birthday")

Since i starts with 0, the "Happy Birthday" print out 10 times. i goes from 0 to 3 to 4 to 5 to 6 to 7 to 8 to 9 to 10 to 11 to 12 to 13 to 14. i begins at an index of 0, it works perfectly.

The program above gives the following output shown below.

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Happy Birthday

Answered by priyankasaklecha65
1

Answer:

you want to be a great day of school and I want to be a

Similar questions