Python Questions
Python Questions
Python Questions
Given array-(2,6,3,5,8,9)
Second program
A string will be given combination of letters and special characters. You have to return a reversed string kee
Example : sd&hg#j
Answer to be returned is : jg&hd#s
First program:
For a given list of numbers, find its factors and add the factors. Then if the sum of factors is present in the o
Example:
Input: 0,1,6
Factors of 0 = 0. Thus sum = 0
3 Factors 1 = 1. Thus sum = 1
Factors of 6 = 1,2,3. Thus sum = 6
Output = 1,6
If the sum numbers are not present in original list, then return -1.
Second Program: Maximum number of swaps will be given and an list of digits will be given. We have to sw
Question 1:
The substring must be the longest one of all the possible substring in the given string.
There must not be any repeating characters in the substring.
If there is more than one substring satisfying the above two conditions, then print the substring which occu
Length of the substring must be minimum 3.
If there is no substring satisfying all the aforementioned conditions then print -1.
Question 2:
4 Given an array of integers, find the combination of integers forming a sequence which satisfies the below c
The ith integer must satisfy the given equation in the sequence
(1) \begin{equation*} X[i] = X[i-1] + X[i-2] \end{equation*}
Even-Odd Series
Given a string and it contains the digits as well as non-digits. We have to find the count of non-digits. If it is
E.g. The given string is */24#5%7&9*3@. We have to count the non-digit. It’s 7, odd. Then remove all the d
numbers then after the even number of completion print the remaining odd numbers.
5 Prosnic Number
Given a string in which random numbers are present and we have to find the product and the number(one
E.g. Given a string contains 1203456. The multiplication of 3 and 4(one is lesser and one is greater) product
in the string and so on. In such a way, We have to find all the numbers and in the output just we have to sto
1. A simple String rotation type question where INPUT will be given in the form of Dictionary and based on
6
2. It is based on matrix which i felt a bit difficult. We have to find the number which occur consecutively 4
elements find the minimum among them.If there is no such element print “-1”.
--
Regards
Gopal Gupta (M.Tech.,B.Tech.) |Sr. Astt. Professor | +91-9711110221
ABES Engineering College, Ghaziabad
Campus 1, 19th KM Stone, NH 24, Ghaziabad -201 009, U.P.
Office: +91 120 7135112 (Ext: ExtensionNumber )|Fax: +91 120 7135115
W: http://abes.ac.in, E: info@abes.ac.in