# Loops

1. Print First 10 natural numbers using while loop.
2. Calculate the sum of all numbers from 1 to a given number.
3. Write a program to print multiplication table of a given number. eg if number is 2, then output should be 2, 4, 6, 8 ...
4. Write a program to display only those numbers from a list that satisfy the following conditions

* The number must be divisible by five
* If the number is greater than 150, then skip it and move to the next number
* If the number is greater than 500, then stop the loop given `numbers = [12, 75, 150, 180, 145, 525, 50]`

1. Write a program to count the total number of digits in a number using a while loop. given number `4673453`
2. Display numbers from -10 to -1 using while loop

#### More Questions for Revision

1. Write a program to print all the numbers from 1 to 100.
2. Write a program to print all the numbers from 1 to 100 except multiples of 3.
3. Write a program to print all alphabets from a to z.
4. given a list of numbers, write a program to print all the numbers that are divisible by 5 and 7.
5. using a for loop, create a pattern like this:

```
*
* *
* * *
* * * *
```

1. Reverse a number using a while loop. given number `12345`, output should be `54321`.
2. Find the sum of even numbers using a while loop
3. Find the factorial of a number using a while loop. Hint: factorial of a number is the product of all the numbers from 1 to n. example number `5`, output should be `120`


---

# 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://kallyasmedia.gitbook.io/cit-python-cohort-three/assignments/loops.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.
