0% found this document useful (0 votes)
2 views25 pages

Python File

The document outlines a series of programming tasks and questions, primarily focused on input/output operations, mathematical computations, and data structure manipulations in Python. It includes tasks such as generating patterns, calculating series sums, checking for prime numbers, and manipulating lists and dictionaries. Each task is followed by an expected output format.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views25 pages

Python File

The document outlines a series of programming tasks and questions, primarily focused on input/output operations, mathematical computations, and data structure manipulations in Python. It includes tasks such as generating patterns, calculating series sums, checking for prime numbers, and manipulating lists and dictionaries. Each task is followed by an expected output format.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Q.1 Input a welcome message and displays it?

OUTPUT:
Q. 2 Input two numbers and display the larger / smaller number?

OUTPUT:
Q.3 Input three numbers and displays the largest / smallest number?

OUTPUT:
Q.4 Generate the following patterns using nested loop?
A)
*

**

***

****
*****

OUTPUT:
B)
12345
1234
123
12
1

OUTPUT:
C)
A
AB
ABC
ABCD
ABCDE

OUTPUT:
Q.5 Write a program to input the value of x and n and print the sum of
the following series:
A)1+x+x2+x3+x4+. ..........xn

OUTPUT:
B) 1-x+x2-x3+x4 .................................xn

OUTPUT:
Q.6 Determine whether a number is a perfect number, an Armstrong number
or a
Palindrome?

OUTPUT:
Q.7 Input a number and checks if the number is a prime or composite
Number?

OUTPUT:
Q.8 Display the terms of a Fibonacci series.?

OUTPUT:
Q.9 Compute the greatest common divisor and least common multiple
of two integers?

OUTPUT:
Q.10 Count and display the number of vowels, consonants, uppercase,
lowercase characters in string?

OUTPUT:
Q.11 Input a string and determines whether it is a palindrome or not; converts
the case of characters in a string?

OUTPUT:
Q.12 Find the largest/smallest number in a list/tuple?

OUTPUT:
Q.13 Input a list of numbers and swap element at the even location with the
elements at the odd location?

OUTPUT:
Q.14 Input a list/tuple of elements, search for a given element in the list/tuple?

OUTPUT:
Q.15 Input a list of numbers and find the smallest and largest number from
the list?

OUTPUT:
Q.16 Create a dictionary with the roll number, name and marks of n
students in a class and display the names of students who have scored
marks above 75?

OUTPUT:
Q.17 Write a program in python to find the area of Circle using If Conditions?

OUTPUT:
Q.18 Write a program to take input from the user and print reverse order?

OUTPUT:
Q.19 Write a program to take two input from the user and concatenate the
strings?

OUTPUT:
Q.20 Write a program to accept list from the used and sort the list?

OUTPUT:
Q.21 Write a program to take input from the user and find the average of the
list?

OUTPUT:
Q.22 Write a program to take input from the used and find the largest and
smallest number from the List?

OUTPUT:

You might also like