Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import the inverse Z-transform function from sympy.
Signal Processing
from sympy import symbols, [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ztrans' which is the forward Z-transform.
Using 'ztransform' which is not a valid sympy function.
Using 'inverse_transform' which does not exist.
✗ Incorrect
The function iztrans is used in sympy to compute the inverse Z-transform.
2fill in blank
mediumComplete the code to define the Z-transform variable 'z' as a symbol.
Signal Processing
z = [1]('z')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Symbol' which is a class, not a function.
Using 'Function' which defines symbolic functions, not variables.
Using 'var' which is not a sympy function.
✗ Incorrect
The 'symbols' function from sympy is used to define symbolic variables.
3fill in blank
hardFix the error in the code to compute the inverse Z-transform of Xz.
Signal Processing
x = [1](Xz, z, n) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ztrans' which computes the forward Z-transform.
Using 'inverse_z' which is not a valid function.
Using 'invztrans' which does not exist in sympy.
✗ Incorrect
The correct function to compute inverse Z-transform in sympy is 'iztrans'.
4fill in blank
hardFill both blanks to define the symbolic variable 'n' as an integer and compute inverse Z-transform.
Signal Processing
n = [1]('n', integer=True) x = iztrans(Xz, z, [2])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'symbols' which does not accept integer=True.
Passing 'z' instead of 'n' to iztrans.
Using undefined variables.
✗ Incorrect
Use 'Symbol' to define 'n' as an integer variable, and pass 'n' as the time variable in iztrans.
5fill in blank
hardFill all three blanks to create a Z-transform expression, define 'n', and compute the inverse Z-transform.
Signal Processing
Xz = 1 / (1 - [1]**-1) n = [2]('n', integer=True) x = [3](Xz, z, n)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'n' instead of 'z' in the expression.
Using 'symbols' instead of 'Symbol' for 'n'.
Using 'ztrans' instead of 'iztrans' for inverse transform.
✗ Incorrect
The Z-transform expression uses 'z', 'n' is defined as a Symbol, and 'iztrans' computes the inverse Z-transform.