---
id: 6958e1875e592b58e8852757
title: Step 12
challengeType: 20
dashedName: step-12
---

# --description--

Now create a variable named `extra_charges` and set it to `0`. This will represent extra charges to apply to the movie ticket on weekends.

Then, create an `if` statement to check if `is_weekend` is truthy. Inside the body of `if` statement, update the `extra_charges` value to `2` and print `Extra charges will be applied` in the terminal.

# --hints--

You should declare a variable named `extra_charges`.

```js
({ test: () => (runPython(`assert _Node(_code).has_variable("extra_charges")`)) })
```

You should assign the integer value `0` to `extra_charges`.

```js
({ test: () => (runPython(`
assert _Node(_code).find_variable("extra_charges").is_equivalent("extra_charges = 0")
`)) })
```

You should have a fourth `if` statement.

```js
({ test: () => (runPython(`assert _Node(_code).find_ifs()[3]`)) })
```

Your fourth `if` statement condition should be `is_weekend`.

```js
({ test: () => (runPython(`
assert _Node(_code).find_ifs()[3].find_conditions()[0].is_equivalent("is_weekend")
`)) })
```

You should assign the integer value `2` to `extra_charges` variable inside your new `if` statement.

```js
({ test: () => (runPython(`
_var = _Node(_code).find_ifs()[3].find_bodies()[0].find_variable("extra_charges") 
assert _var.is_equivalent("extra_charges = 2")
`)) })
```

You should print `Extra charges will be applied` inside your new `if` statement. Remember to surround the message with single or double quotes.

```js
({ test: () => (runPython(`
assert _Node(_code).find_ifs()[3].find_bodies()[0].has_call("print('Extra charges will be applied')")
`)) })
```

# --seed--

## --seed-contents--

```py
base_price = 15
age = 21
seat_type = 'Gold'
show_time = 'Evening'

if age > 17:
    print('User is eligible to book a ticket')

if age >= 21:
    print('User is eligible for Evening shows')
else:
    print('User is not eligible for Evening shows')

is_member = False
is_weekend = False

discount = 0
if is_member and age >= 21:
    discount = 3
    print('User qualifies for membership discount')
else:
    print('User does not qualify for membership discount')
print('Discount:', discount)

--fcc-editable-region--

--fcc-editable-region--
```
