0% found this document useful (0 votes)
0 views7 pages

Python_Programs_Input_Output

Python input output

Uploaded by

zenitsu123my
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views7 pages

Python_Programs_Input_Output

Python input output

Uploaded by

zenitsu123my
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Python Programs with Input and

Output
Q1
1. Write a program to print sum of individual digits of a given number.

Input:

Output:

Q2
2. Write a program to convert a List and Tuple into arrays.

Input:

Output:

Q3
3. Write a program to print Reverse of a given number.

Input:

Output:

Q4
4. Write a program to remove duplicates by using function.

Input:

Output:
Q5
5. Write a program to print:
5
44
333
2222
11111

Input:

Output:

Q6
6. Write a program to add a comma between characters in a given string.

Input:

Output:

Q7
7. Write a program to find Simple and Compound Interest.

Input:

Output:

Q8
8. Write a program to remove the given word in a string.

Input:

Output:
Q9
9. Write a program to find distance between two coordinates.

Input:

Output:

Q10
10. Write a program to replace the first letter of every word with uppercase and rest in
lowercase.

Input:

Output:

Q11
11. Program to generate Fibonacci series up to n terms.

Input:

Output:

Q12
12. Write a program to print addition of matrix.

Input:

Output:
Q13
13. Write a program to accept a character and determine its type.

Input:

Output:

Q14
14. Write a program to print multiplication of matrix.

Input:

Output:

Q15
15. Write a program to accept name, address, email, phone and print details.

Input:

Output:

Q16
16. Write a program to generate all binary strings of n-bit using function.

Input:

Output:

Q17
17. Write a program to find the factorial of a number.

Input:
Output:

Q18
18. Write a program to check if a number is prime or not.

Input:

Output:

Q19
19. Write a program to count vowels, consonants, digits, and spaces in a string.

Input:

Output:

Q20
20. Write a program to check if a string is palindrome.

Input:

Output:

Q21
21. Write a program to demonstrate union, intersection, difference of sets.

Input:

Output:
Q22
22. Write a program to calculate factorial using recursion.

Input:

Output:

Q23
23. Write a program to use lambda to filter even numbers from a list.

Input:

Output:

Q24
24. Write a program to reverse a string without using built-in functions.

Input:

Output:

Q25
25. Write a program to print all duplicate elements from a list.

Input:

Output:

Q26
26. Write a function to find the GCD of two numbers.

Input:
Output:

Q27
27. Write a program to create dictionary with names and marks, print those > 75.

Input:

Output:

Q28
28. Convert a list to a set and display only unique items.

Input:

Output:

Q29
29. Merge two dictionaries and sort by value.

Input:

Output:

Q30
30. Create list and perform any five operations with built-in functions.

Input:

Output:

You might also like