Skip to content

Paul-Andrew-15/Circulate-the-values-of-N-variables

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Circulate-the-values-of-N-variables

Aim:

To write a python program to circulate the n variables using function concept

Equipment’s required:

PC Anaconda - Python 3.7

Algorithm:

Step 1:

import def circulate

Step 2:

Prepare the lists from each linear equations and assign in np.array()

Step 3:

Get the value from the user for the number of rotation

Step 4:

Using the slicing concept rotate the list

Step 5:

add coding to input value

Step 6:

print the coding to get answer

Program:

#Program to circulate N values.
#Developed by:D.Paul Andrew
#RegisterNumber:21500230
def circulate():
    l=[10,20,30,40,50,60]
    n=int(input())
    result=l[n:]+l[:n]
    print("After circulating the values are:",result)

Output:

Output

Result:

Thus the python program to circulate the n variables using function concept is obtained.

About

Circulate the values of N variables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published