Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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() 
 
PREVIOUS NEXT
Tagged: #python #procedured
ADD COMMENT
Topic
Name
6+8 =