Assignment-4

1. Write a C program to input electricity unit charges and calculate total electricity bill according to the given condition:
For first 50 units Rs. 0.50/unit
For next 100 units Rs. 0.75/unit
For next 100 units Rs. 1.20/unit
For unit above 250 Rs. 1.50/unit
An additional surcharge of 20% is added to the bill.

2.WAP to calculate the tax the person has to pay, based on their income.
If the income is less than 2,50,000 there is no tax.
If the income is above 2,50,000 but below 5,00,000 : the tax will be 5% of the income above 2,50,000.
If the income is above 5,00,000 but less than 10,00,000 : their tax will be 10% of the income above 500,000 + tax for the slab 250,001 to 500,000
Lastly, If the income is above 10,00,000 : their tax will be 15% of the income above 10,00,000 + tax for the slab 5,00,001 to 10,00,000 + tax for the slab 250,001 to 500,000

3.An imaginary particle named himutron starts from rest.

During it’s first 10 seconds of motion it travels at a velocity of 10m/s.
The next 20 seconds it travels at a velocity of 15m/s.
The next 30 seconds it travels at a velocity of 20m/s.
After that it continues to travel at a constant velocity of 25m/s.
WAP which takes the time in seconds and prints out how far the particle is from the starting point at that point in time in meters

4.Write a Python program to print all natural numbers from 1 to n. 
3.Write a Python program to print all natural numbers in reverse .
3. Write a Python program to print all alphabets from a to z.

4.Write a python program to print all even numbers between 1 to 100. 

5.Write a python program to print all odd number between 1 to 100.

6.Write a Python program to find sum of all natural numbers between 1 to n.

7.Write a Python program to find sum of all even numbers between 1 to n.

8.Write a python program to find sum of all odd numbers between 1 to n.

9.Write a python program to print multiplication table of any number.

10.Write a python program to count number of digits in a number.

11.Write a python program to find first and last digit of a number.