skip to content
promptdojo
_
[ save your spot ]
[ follow on x ]
Conditionals and the truthiness traps — step 2 of 8
ch 05 · conditionals
2/8
promptdojo
_
›
phase 01 · foundations
›
ch 05 · conditionals
lesson 1 of 2 · conditionals and the truthiness traps
step 2 of 8 in this lesson
Cursor wrote
if x:
and the branch did not fire. Which value of
x
would
skip
the
if
block?
1
`x = "hello"`
2
`x = [1]`
3
`x = []`
4
`x = -5`
check
Show hint
ch 05 · conditionals
2/8
promptdojo
_
›
phase 01 · foundations
›
ch 05 · conditionals
lesson 1 of 2 · conditionals and the truthiness traps
step 2 of 8 in this lesson
Cursor wrote
if x:
and the branch did not fire. Which value of
x
would
skip
the
if
block?
1
`x = "hello"`
2
`x = [1]`
3
`x = []`
4
`x = -5`
check
Show hint
park a thought