Python Bascis
Python Bascis
Q.1) Writes a program to accept two numbers and show its sum.
Input:-
Output:-
Q.2 write a program to accept principle date and time from the user and calculate simple
interest and amount.
Input:-
Output:-
Q3.write a program to accept a side of a square from a user and calculate perimeter and area
Input:-
Output:-
Output:-
Q.5 write a python program that access marks in five subject and output total and average.
Input:-
Output:-
Q6 Market trend in new startup company that deals with the sales of online goods within the
city to find GST (goods service tax) on the product the company developed a computerized. It is
a value added tax in a good and services . Which is sold on domestic purpose and consumption
GST is paid by the customer to government on goods and services . write a python code that
accept original net price of the product and calculate the GST percentage.
Input:-
I Output:-
GST PERSENTAGE
Input:-
Output:-
Q7. Write a program to obtain temperature in celcius and convert into Fahrenheit using formula
Input:-
Output:-
Q8. Write a code to calculate and display the selling price of the item and aspect cost price and
profit from the user
Input:-
Output:-
Q9.write a program that aspect cost price and quantity of pencil from the user and display the
total amount
Input:-
Output:-
Q10. Write a function that takes amount in dollar and dollar to rupee conversion
price it than return the amount converted to rupee.
Input:-
Output:-
Q11. Write a program to check whether the number enter the user is even or odd .
Input:-
Output:-
Q12. A company decided to bonus of 5% to employ if his/her years of service is more than 5
years. Ask user for their salary and years of service and print net bonus amount.
Input:-
Output:-
Output:-
Q15. Write a program to input week number and with week days
Input:-
Output:-
Output:-
Q.17) Write a program to input month number and print number of days in month.
Output:-
Q18. Write program to accept percentage from the user and display the grade according to the
following criteria.
Marks Grade
>90 A
>80 and <=90 B
>=60 and <=80 C
<60 D
Input:-
Output:-
Q19. Write a program to accept the cost price of a bike and display the road tax to be paid
according to the following criteria.
COST PRICE TAX
>100000 15%
>500000 and <=100000 10%
<=500000 5%
Input:-
Output:-
Q20 .Write a program to accept three number from the user and display the lowest among the
three
Input:-
Output:-
Output:-
Output:-
Q.25) Write a program to print the sum of first ten natural number.
Input:-
Output:-
Q27. Write a program to find the numbers which are divisible by 7 and are multiple of 5 ,
between 1 and 1000 (both included)
Input:-
Output:-
Q.28) Accept three sides of a triangle and check whether it is equilateral, isosceles, or scalene
triangle.
Input:-
Output:-
Q.29) write a program to get a string as input from the user and print it in the reverse order.
Input:-
Output:-
Q30) write a program to read a list of an integers positive as well as negative create two new list
of one having all positive numbers and the other having all negative number from the given list
print all three list.
Input:-
Output:-
Output:-
Q32) Write a program to find the number of elements occurred in the list.
Input:-
OUTPUT:-
Q33) Write a program to find the largest and second largest elements in the given list of
elements.
Input:-
Output:-
Q34) Write a program that accepts the gender, total number of years of experience, and salary
from the employee and performs the following calculation:
A) If the gender is M, then increase the salary by 5% and if the gender is F, then increase the
salary by 6%.
Input:-
B) If the experience is greater than or equal to10 years, then increase the salary by the
additional point number (a) by 10% for both M and F.
Q35) Write a program to print the following series till n terms.
1+2+3+4+5+_n
Q36) write a program to create a list of elements and input element from the user that has to
be inserted in the list also input the position at which inserted
Input:-
Q37) Write a program to read element and do the following:
a) The program should ask for the position to be deleted from the list and delete the element at
the desire the position in list.
b) The program should ask for the value at the element to be deleted from the list and value
delete the value from the list.