> For the complete documentation index, see [llms.txt](https://www.pythonclassroom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pythonclassroom.com/loops/for-loop-range-two-arguments/for-loop-two-arguments.md). Agents can also search and read this documentation through its [MCP server](https://www.pythonclassroom.com/~gitbook/mcp).

# Problems

## Problem 1

Ask the user for a maximum number.

Use a for loop to display a table showing the numbers 1 through max and their cubes (raised to the third power).

Start your code with the heading:

print("Number\tCubed")

## Problem 2

Create a table of values (x,y) for the x values from -3 to 3 for the function:

$$
f(x)=13x^2+5
$$

## Problem 3

Create a table of values (x,y) for the x values from -4 to 4 for the equation:

$$
y=2x^3-5x+1
$$

## Problem 4

Running on a treadmill, you burn 4.5 calories per minute. Ask the user how many minutes they want to run on the treadmill. Display the number of calories burned from 1 to the number they want to run till (including that number).

## Problem 5

The distance a vehicle travels can be calculated as:

$$
distance = speed  \* time
$$

Write Python code that asks the user for the speed of a vehicle (in miles per hour) and the number of hours it has traveled. Display a table with the distance the vehicle has traveled for each hour, starting at one, until the number of hours traveled.

## Problem 6

At a college, the tuition for a full-time student is $8000 per semester. It was announced that the tuition will increase by 5% each year. How many years will it take for you reach college? What is the projected amount of tuition each year till then?


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.pythonclassroom.com/loops/for-loop-range-two-arguments/for-loop-two-arguments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
