python procedured

Solutions on MaxInterview for python procedured by the best coders in the world

showing results for - "python procedured"
Tommaso
17 May 2017
1def printname(): #procedure 
2    name = input('What is your name? ')
3    number = int(input('How many times do you want your name to be printed? '))
4    for x in range(number):
5        print(name) # This program will only run if the procedure would be called out in the main program.
6
7print('Welcome to the name printing progam!')
8print('------------------------------------')
9
10printname() #Calling out the procedure
11input()