0% found this document useful (0 votes)
15 views

Python Challenging Questions

Python Challenging Questions

Uploaded by

Rakesh Soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Python Challenging Questions

Python Challenging Questions

Uploaded by

Rakesh Soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Python Coding Competition

Solve any two of the following questions to qualify for the selection round:

Q.1 Write a program to find LCM of two or more then two numbers entered by the user.

Q.2 Write a program to accept a string (minimum length of string to be 3 and maximum to
be 9) and code the program to produce the following result:

Sample Input : “cow”

Output : cow
cwo
owc
ocw
woc
wco

Q.3 Write a program to take input of a list object having numbers between 1 to 9 only with
minimum list elements count to be 3 and maximum to be 9 as shown below using a test
case and produce the output shown below.

Input : [ 5, 1, 6, 7, 9 ]

Output : [ 1, 5, 6, 7, 9]
[ 5, 6, 7, 9, 1]
[ 6, 7, 9, 1, 5]
[ 7, 9, 1, 5, 6]
[ 9, 1, 5, 6, 7]

Q.4 Write a code to draw pattern:

1 2 3 4 5 6 7 8
7 6 5 4 3 2 1
1 2 3 4 5 6
5 4 3 2 1
1 2 3 4
3 2 1
1 2
1

Q.5 Write a code to draw the following pattern:

You might also like