Skip to content

PSriVarshan/Circulate-the-values-of-N-variables

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 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:

Get the n values from the user

Step 2:

Circulate the values of n variables

Step 3:

Get the value from the user for the number of rotation

Step 4:

Using the slicing concept rotate the list

Step 5:

Print both the values it would be circulated

Step 6:

Print both the values it would be circulated

Program:

#Program to circulate N values.
#Developed by: P.Sri Varshan
#RegisterNumber:22008051
def circulate():
    circul=l[n:]+l[:n]
    print("After circulating the values are:",circul)
l=eval(input())
n=eval(input())

Output:

Result:

Thus the circulating the values of n variables are successfully executed

About

Circulate the values of N variables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published