Challenge - 5 Problems
Z-transform Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding the Z-transform formula
Which of the following expressions correctly defines the Z-transform of a discrete-time signal x[n]?
Attempts:
2 left
💡 Hint
Recall that the Z-transform uses a sum over all integer n with z raised to the negative power of n.
✗ Incorrect
The Z-transform of a discrete-time signal x[n] is defined as the sum over all n from minus infinity to infinity of x[n] times z to the power of negative n.
❓ Predict Output
intermediate2:00remaining
Output of Z-transform calculation for a finite signal
What is the output of the following Python code that computes the Z-transform for x[n] = {1, 2, 3} at z=2?
Signal Processing
import numpy as np x = [1, 2, 3] z = 2 X_z = sum(x[n] * z**(-n) for n in range(len(x))) print(X_z)
Attempts:
2 left
💡 Hint
Calculate each term: x[0]*z^0 + x[1]*z^-1 + x[2]*z^-2
✗ Incorrect
The calculation is 1*2^0 + 2*2^-1 + 3*2^-2 = 1 + 1 + 0.75 = 2.75.
❓ data_output
advanced2:30remaining
Z-transform sequence output
Given the signal x[n] = {1, -1, 2} for n=0,1,2, what is the sequence of Z-transform values X(z) for z = 1, 2, 3?
Signal Processing
x = [1, -1, 2] z_values = [1, 2, 3] X_z = [sum(x[n] * z**(-n) for n in range(len(x))) for z in z_values] print(X_z)
Attempts:
2 left
💡 Hint
Calculate X(z) for each z by summing x[n]*z^(-n).
✗ Incorrect
For z=1: 1 -1 + 2 = 2.0; for z=2: 1 -0.5 + 0.5 = 1.0; for z=3: 1 - 1/3 + 2/9 ≈ 0.8889.
🔧 Debug
advanced2:00remaining
Identify the error in Z-transform code
What error does the following Python code produce when computing the Z-transform?
Signal Processing
x = [1, 2, 3] z = 2 X_z = sum(x[n] * z**(-n) for n in range(len(x))) print(X_z)
Attempts:
2 left
💡 Hint
Check the use of curly braces in the exponent.
✗ Incorrect
The code uses curly braces { } instead of parentheses ( ) for exponentiation, which is invalid syntax in Python.
🚀 Application
expert3:00remaining
Applying Z-transform to solve difference equation
Given the difference equation y[n] - 0.5 y[n-1] = x[n], and the input x[n] = (0.5)^n u[n] (u[n] is the step function), what is the Z-transform Y(z) of the output y[n]?
Attempts:
2 left
💡 Hint
Take the Z-transform of both sides and solve for Y(z).
✗ Incorrect
Taking Z-transform: Y(z) - 0.5 z^{-1} Y(z) = X(z) => Y(z)(1 - 0.5 z^{-1}) = X(z) => Y(z) = X(z) / (1 - 0.5 z^{-1})