Python Questions
5.34K subscribers
1 photo
7 links
Tasks for Beginners, Interview Questions, Regular expressions, simple coding problems, Quiz etc.

Useful Resources — »»» @python_resources_iGnani
Projects for Practice — »»» @python_projects_repository
Discussion Forum — »»» @python_programmers_club
Download Telegram
Channel created
Welcome to Python Questions!

This channel caters to beginners, experienced python developers and those who just want to try somthing new.

It will contain simple objective questions to complex problems to solve using Python programming language.
It will also contain common interview questions.
Regular expressions, Algorithms, Quiz will also be posted.

For bigger problems, we will be posting the solutions on our github repository: https://github.com/ignani/LearnPython
Is this a valid code. If you say no, then explain?
*

myList = [1, 2, 3, 4, 2, 2, 3, 1, 4, 4, 4,5,5,6,7,6,5]

A) Write a program to get the value that appears more number of times
B) When there is a tie, then get the number which is the smallest of them

#python #practiceCode #samples #interviewQuestions #numbers #list
# Sequence Puzzle
[30, 9, 40, 50, 91, 142, 234, ?] Find the next value?
Anonymous Poll
17%
276
16%
277
22%
334
17%
376
28%
377
*

name = 'ppy!'
Write code to insert the letter 'a' in-between each letter to form the word 'papaya!'

#python #practiceCode #samples #interviewQuestions #strings #list
.

a = 1
b = 2
Swap the values without using an additional variable.

#python #practiceCode #samples #interviewQuestions
x = 100
y = 200
print(x and y) #Explain Y do you think so?
Anonymous Quiz
10%
100
24%
200
18%
300
48%
Error
What does ~~~~~7 evaluate to?
Anonymous Quiz
24%
7
4%
8
35%
-7
10%
-8
28%
Error
#answer to the question 👆is ————-»»» class float

Since the result of 1/2 is 0.5, which is a float.

65% got it correct.
#answer to the question 👆is ————-»»» b) hello world!

the keyword argument sep by default is set to a single space " ", hence it add's a space inbetween the two words.

50% have answered it correct.
x = "Hello World!"
Which of the following is incorrect & Why?
Anonymous Quiz
18%
print(x[0])
49%
x[0] = ‘h’
22%
print(x.strip())
11%
print(x.upper())
Given a function that does not return any value, what value is shown when executed at the shell?
Anonymous Quiz
8%
Int
6%
Float
11%
bool
36%
void
39%
None
What is the optput of the expression
1 + 2 ** 3 * 4
Explain why?
Anonymous Quiz
51%
33
12%
36
14%
108
15%
4097
7%
531441
Which function is to be used to print to console?
Anonymous Quiz
15%
printf()
28%
console.out()
50%
print()
4%
log()
2%
write()
What is output of the following code?
a = ['he', 'she', 'we']
' '.join(a)
Anonymous Quiz
43%
'heshewe'
15%
'he,she,we'
26%
'he she we'
16%
error