Ask Question
28 September, 13:25

Write a function named ilovepython that prints out I love Python three times. Then, call that function.

+2
Answers (1)
  1. 28 September, 16:25
    0
    The program to this question can be described as follows:

    Program:

    def ilovepython () : #defining a method

    for i in range (3) : #defining a loop that print messasge three times

    print ('I love Python') #print messasge

    ilovepython () #calling the method

    Output:

    I love Python

    I love Python

    I love Python

    Explanation:

    Description of the python program can be described as follows:

    In the above Python program, a method "ilovepython" is defined, inside the method a for loop is used, inside the loop print method is used, that print the message "I love Python". In python for loop is used to iterate over series and we can execute a set of statements with the loop, tuple, series, once for each element in the list.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a function named ilovepython that prints out I love Python three times. Then, call that function. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers