Skip to content

abdulwasih2003/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:

Commence the program

Step 2:

Get the value from the user for the number of rotation

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 the rotated list

Step 6:

End the program

Program:

#Program to circulate N values.
#Developed by: Syed Abdul Wasih H
#RegisterNumber: 21002291
def circulate():
    n=int(input())
    l=[10,20,30,40,50,60]
    a=l[n:]+l[:n]
    print("After circulating the values are:",a)

Output:

output

Result:

The variables are rotated successfully.

About

Circulate the values of N variables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published