Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Ask a Question
Top 100+ questions and answers in Python
Home
Questions
Python
+1
vote
Q: What are functions in Python?
answered
Feb 13
in
Python
by
rajeshsharma
python-functions
+1
vote
Q: How do I write a while loop in Python?
answered
Feb 13
in
Python
by
rajeshsharma
while-statement
python
+1
vote
Q: How do I write a for loop in Python?
answered
Feb 13
in
Python
by
rajeshsharma
loop-statement
python
+1
vote
Q: How do I write an if statement in Python?
answered
Feb 13
in
Python
by
rajeshsharma
python-if-statement
+1
vote
Q: What are control flow statements in Python?
answered
Feb 13
in
Python
by
rajeshsharma
control-statement
+1
vote
Q: How do I convert between data types in Python?
answered
Feb 13
in
Python
by
rajeshsharma
python-data-types
+1
vote
Q: How do I perform mathematical operations in Python?
answered
Feb 13
in
Python
by
rajeshsharma
python-questions
+1
vote
Q: What are the different data types in Python?
answered
Feb 13
in
Python
by
rajeshsharma
python-data-types
+1
vote
Q: What are variables in Python?
answered
Feb 13
in
Python
by
rajeshsharma
python-variables
+1
vote
Q: How do I install Python?
answered
Feb 13
in
Python
by
rajeshsharma
python-install
+1
vote
Q: What are the differences between Python 2 and Python 3?
answered
Feb 13
in
Python
by
rajeshsharma
python2
python3
+1
vote
Q: What are the benefits of using Python?
answered
Feb 13
in
Python
by
rajeshsharma
python-benefits
0
votes
Q: What is Python and why should I learn it?
answered
Feb 13
in
Python
by
rajeshsharma
python
+1
vote
Q: You are given a dataframe with prices of cheeses. However, the dataframe is missing values in the price column. Write a function to impute the median price in place of missing values.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
dataframe
datasets
+1
vote
Q: Given a dataframe with rainfall data (day of the week and rainfall inches), write a function to find the median amount of rainfall for the days on which it rained.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
dataframe
datasets
+1
vote
Q: Given a dataframe of students’ favorite colors and test scores, write a function to select only those rows (students) where their favorite color is green or red and their test grade is above 90.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
dataframe
datasets
+1
vote
Q: Given two dataframes (one with addresses and the other with various cities and states), write a function to create a single dataframe with complete addresses.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
dataframes
+1
vote
Q: Given a dataset of test scores, write Pandas code to return cumulative bucketed scores of <50, <75, <90, <100.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
datasets
python
strings
+1
vote
Q: Write a function to simulate the overlap of two computing jobs and output an estimated cost.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
function
+1
vote
Q: Amy and Brad take turns rolling a fair six-sided die. Whoever rolls a “6” first, wins the game. Amy starts by rolling first.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
string
0
votes
Q: Given a list of stock prices in ascending order by datetime, write a function that outputs the max profit by buying and selling at a specific interval.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
list
python
strings
0
votes
Q: Write a function that takes in a list of dictionaries with both a key and list of integers, and returns a dictionary with the standard deviation of each list.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
list
0
votes
Q: Write a function to generate N samples from a normal distribution and plot them on the histogram.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
function
plot
histogram
+1
vote
Q: Given two strings, string1 and string2, write a function is_subsequence to find out if string1 is a subsequence of string2.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
string
functions
+1
vote
Q: Given a string, return the first recurring character in it, or “None” if there is no recurring character.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
string
functions
+2
votes
Q: Given two strings, string1 and string2, determine if there exists a one to one character mapping between each character of string1 to string2.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python
strings
functions
+1
vote
Q: Given two strings A and B, return whether or not A can be shifted some number of times to get B.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
python-function
string-functions
+1
vote
Q: Write a function that can take a string and return a list of bigrams.
answered
Oct 28, 2022
in
Python
by
SakshiSharma
bigams
python-function
+1
vote
Q: Explain the zip() and enumerate() functions.
answered
Oct 27, 2022
in
Python
by
SakshiSharma
zip-function
enumerate-function
+1
vote
Q: What are some of the limitations of Python?
answered
Oct 27, 2022
in
Python
by
SakshiSharma
python-limitations
To see more, click for all the
questions in this category
.
...