A first homework to practice the basics from the first two labs; definition of variables, vectors, matrices, functions, working with strings and data structures.
Your task is to define the variables and functions as described below.
Define the following objects as described in the template;
x
, y
, s
, and δ
primes
and fives
tup
A
, B
and 3D tensor C
Implement the following two functions as described in the template;
normal
for the calculation of the probability density value of the Normal distribution.
count_letters
for counting letters in text.
Tips for successful solution:
count_letters
by měla správně spočítat i písmena s nulovou četností. Stačí počítat písmena anglické abecedy. Počítejte velká a malá písmena dohromady a do slovníku indexujte malými písmeny.
count_letters
should correctly count letters with zero occurrences as well. Count uppercase and lowercase letters together. Index into the dictionary using lowercase letters.
δ
in VSCode by typing “\delta” and hitting tab. Or just copy it.)