This Python essential **exercise** is to help Python beginners to** learn necessary Python skills **quickly. Practice Python Basic Concepts such as Loops, Control structure, List, Strings, input-output, and built-in functions.

**Further Reading**: Explore All Python Exercises and Python Quizzes to practice Python.

**What Questions included in this Python fundamental exercises?**

- The exercise contains
**15**questions. The solution provided for each question. - Each question contains the basic skills you need to learn.

I have added tips and required learning resources for each question, which helps you to solve the exercise. When you complete each question, you get more familiar with a control structure, loops, string, and list in Python.

**Use** Online Code Editor **to solve exercise questions**.

Also, try to solve the basic Python Quiz for beginners

#### Question 1: Given a two integer numbers return their product and if the product is greater than 1000, then return their sum

Reference article for help:

**Given**:

number1 = 20 number2 = 30

**Expected Output**:

The result is 600

**Given**:

number1 = 40 number2 = 30

**Expected Output**:

The result is 70

#### Question 2: Given a range of first 10 numbers, Iterate from start number to the end number and print the sum of the current number and previous number

Reference article for help:

**Expected Output**:

Printing current and previous number sum in a given range(10) Current Number 0 Previous Number 0 Sum: 0 Current Number 1 Previous Number 0 Sum: 1 Current Number 2 Previous Number 1 Sum: 3 Current Number 3 Previous Number 2 Sum: 5 Current Number 4 Previous Number 3 Sum: 7 Current Number 5 Previous Number 4 Sum: 9 Current Number 6 Previous Number 5 Sum: 11 Current Number 7 Previous Number 6 Sum: 13 Current Number 8 Previous Number 7 Sum: 15 Current Number 9 Previous Number 8 Sum: 17

#### Question 3: Given a string, display only those characters which are present at an even index number.

For example `str = "pynative"`

so you should display ‘p’, ‘n’, ‘t’, ‘v’.

Reference article for help: Python Input and Output

**Expected Output**:

Orginal String is pynative Printing only even index chars p n t v

#### Question 4: Given a string and an integer number n, remove characters from a string starting from zero up to n and return a new string

For example, `removeChars("pynative", 4)`

so output must be `tive`

. **Note**: `n`

must be less than the length of the string.

Also try to solve Python String Exercise

#### Question 5: Given a list of numbers, return True if first and last number of a list is same

**Expected Output**:

Given list is [10, 20, 30, 40, 10] result is True Given list is [10, 20, 30, 40, 50] result is False

#### Question 6: Given a list of numbers, Iterate it and print only those numbers which are divisible of 5

**Expected Output**:

Given list is [10, 20, 33, 46, 55] Divisible of 5 in a list 10 20 55

**Also try to solve Python list Exercise**

#### Question 7: Return the total count of sub-string “Emma” appears in the given string

Given string is “*Emma is good developer. Emma is a writer*”

**Expected Output**:

Emma appeared 2 times

#### Question 8: Print the following pattern

1 2 2 3 3 3 4 4 4 4 5 5 5 5 5

Reference article for help: Print Pattern using for loop

#### Question 9: Reverse a given number and return true if it is the same as the original number

**Expected Output**:

original number 121 The original and reverse number is the same original number 125 The original and reverse number is not same

#### Question 10: Given a two list of numbers create a new list such that new list should contain only odd numbers from the first list and even numbers from the second list

**Expected Output**:

First List [10, 20, 23, 11, 17] Second List [13, 43, 24, 36, 12] result List is [23, 11, 17, 24, 36, 12]

**Note: **Try to solve Python list Exercise

Also, Test you basic concepts using Basic Python Quiz for Beginners.

#### Question 11: Write a code to extract each digit from an integer, in the reverse order

**Expected Output**:

For example, if the given int is **7536**, the output shall be “**6 3 5 7**“, with a space separating the digits.

#### Question 12: Calculate income tax for the given income by adhering to the below rules

Taxable Income | Rate (%) |

First $10,000 | 0 |

Next $10,000 | 10 |

The remaining | 20 |

**Expected Output**:

For example, suppose that the taxable income is $45000 the income tax payable is

$10000*0% + $10000*10% + $25000*20% = $6000.

#### Question 13: Print multiplication table form 1 to 10

**Expected Output**:

1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 10 20 30 40 50 60 70 80 90 100

#### Question 14: Print downward Half-Pyramid Pattern with Star (asterisk)

* * * * * * * * * * * * * * *

Reference article for help: Print Pattern using for loop

#### Question 15: Write a function called `exponent(base, exp)`

that returns an int value of base raises to the power of exp.

Note here exp is a non-negative integer, and the base is an integer.

**Expected Output**:

*Case 1:*

base = 2

exponent = 5

2 raises to the power of 5 is: 32 i.e. (2 *2 * 2 *2 *2 = 32)

*Case 2:*

base = 5

exponent = 4

5 raises to the power of 4 is: 625 i.e. (5 *5 * 5 *5 = 625)

## So What Do You Think?

I want to hear from you. What do you think of this basic exercise? If you have better alternative answers to the above questions, please help others by commenting on this exercise.

I have shown only 15 questions in this exercise because we have Free topic-specific exercises to cover each topic practice in detail. Please have a look at it.