4. if / else

1creation_year = 1
2if creation_year <= 3:
3    print("Your car is new")
4if creation_year > 3:
5    print("Your car is old")
line that just executed

next line to execute

Print output (drag lower right corner to resize)
Frames
Objects

Activity: CodeLens 4.1 (cl_l10_4a_en)

1creation_year = 1
2if creation_year <= 3:
3    print("Your car is new")
4else:
5    print("Your car is old")
line that just executed

next line to execute

Print output (drag lower right corner to resize)
Frames
Objects

Activity: CodeLens 4.2 (cl_l10_4b_en)

You have attempted 1 of 2 activities on this page