# nested if Problems

## Problem 1

Write Python code that asks the user if they are filing what status they are filing as. The choices are:

* Single
* Married Filing Jointly
* Head of Household

Ask the user what their income was. Subtract the appropriate deduction.  Note: Married Filing Separately has the same standard deduction as single.&#x20;

Print the amount of tax due.

![Source: Kiplinger](/files/-LrfcoGJDvV5ZLtA8ts6)

![Source: Kiplinger](/files/-LrfcDpsR26MJ4LzYhOT)

![Source: Kiplinger](/files/-LrfcLr7EjBlMxgYzsso)

## Problem 2

These rates apply to the Lincoln & Holland tunnels, the George Washington, Bayonne & Goethals bridges, and the Outerbridge Crossing.

Write Python code to determine the amount of money you pay at the toll depending on:

* Vehicle Type
* The number of axels
* EZPass Off Peak Hours
* EZPass Peak Hours
* EZPass
* Cash

Peak Hours

* Weekdays: 6-10 a.m., 4-8 p.m.
* Sat. & Sun.: 11 a.m.-9 p.m.

Off-Peak Hours

* All Other Times

Overnight Hours for Trucks

* Sundays-Thursdays, 10 p.m. until 6 a.m. the following morning

![Source: The Port Authority of New York and New Jersey](/files/-Lx_iOLVjJO5qCwxPdSd)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.pythonclassroom.com/decisions-if-elif-else/nested-if/nested-if-problems.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
