Python Test Questions
Python Test Questions
Sample List:[1, 2, 3, 4, 5, 6, 7, 8, 9]
Expected Result: [2, 4, 6, 8]
• Write a program which will find all such numbers which are
divisible by 7 but are not a multiple of 5 between 2000 and
3200 (both included).
The numbers obtained should be printed in a comma-
separated sequence on a single line.
Hints:
In case of input data being supplied to the question, it
should be assumed to be a console input.
Consider use dict().
Hints:
In case of input data being supplied to the question, it
should be assumed to be a console input.
tuple() method can convert list to tuple
Hints:
In case of input data being supplied to the question, it
should be assumed to be a console input.
Hints:
In case of input data being supplied to the question, it
should be assumed to be a console input.
We use set() method to remove duplicated data automatically
and then use sorted() to sort the data.