What is the largest profit from daily prices with at most two trades?
A Python puzzle about the best two trades in a list of daily prices.
Classic puzzles in counting, probability, expected value, statistics and Python coding, from easy to hard. Try each question first, then open its solution, which shows every step.
A Python puzzle about the best two trades in a list of daily prices.
A Python puzzle about the best single trade in a list of daily prices.
A permutations and combinations puzzle about painting a cube and turning it.
A Python puzzle about turning two lists into a dictionary.
A regression puzzle about standard errors and independent observations.
A conditional probability puzzle where the host's rule determines the answer.
A Python puzzle about when Python creates a function's default values.
A conditional probability puzzle that Bayes' theorem solves.
A regression puzzle about the slope of Y on X and the slope of X on Y.
A Python puzzle about computing returns from a list of prices in one line.
An expected value puzzle about collecting all six faces of a die.
A probability puzzle that the complement rule solves.
A Python puzzle about the largest trading profit from a list of daily prices.
A statistics puzzle about covariance, variance and correlation.