Answers for "procedure in python"

3

python procedured

def printname(): #procedure 
    name = input('What is your name? ')
    number = int(input('How many times do you want your name to be printed? '))
    for x in range(number):
        print(name) # This program will only run if the procedure would be called out in the main program.

print('Welcome to the name printing progam!')
print('------------------------------------')

printname() #Calling out the procedure
input()
Posted by: Guest on June-29-2020

Python Answers by Framework

Browse Popular Code Answers by Language