0% found this document useful (0 votes)
9 views2 pages

Python Index

The document is an index of Python programming exercises, each with a specific task such as printing messages, performing calculations, and implementing games. It includes a variety of topics, from basic syntax to more complex functions like checking for prime numbers and generating passwords. Each entry is numbered and describes the task to be accomplished in the program.

Uploaded by

Bhagvender Singh
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)
9 views2 pages

Python Index

The document is an index of Python programming exercises, each with a specific task such as printing messages, performing calculations, and implementing games. It includes a variety of topics, from basic syntax to more complex functions like checking for prime numbers and generating passwords. Each entry is numbered and describes the task to be accomplished in the program.

Uploaded by

Bhagvender Singh
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

INDEX

[Link] Program Signature


1 Write a Python Program to print “Hello
World”?
2 Write a Python Program to add two numbers?
3 Write a Python Program to check if a number
is odd or even?
4 Write a Python Program to check prime
number?
5 Write a Python Program to find the
factorial of a number?
6 Write a Python Program to check Armstrong
number?
7 Write a Python Program that asks the user
to enter their name and their age. Print
out a message addressed to them that tells
them the year that they will turn 100 years
old?
8 Write a Python Program that print out all
the elements of the list that are less than
5?
9 Write a Python Program that asks the user
for a number and then prints out a list of
all the divisors of that number?
10 Write a Python Program that returns a list
that contains only the elements that are
common between the lists (without
duplicates). Make sure your program works
on two lists of different sizes?
11 Write a Python Program to check whether the
string is palindrome or not?
12 Write a one-line Python Program that takes
this list a and makes a new list that has
only the even elements of this list in it?
13 Write a Python Program that make a two
player Rock-Paper-Scissor Game. (Hint: Asks
for player plays (using input), compare
them, print out a message of
congratulations to the winner, and ask them
if a player want to start a new game).
14 Write a Python function to check whether
string is pangram or not?
15 Write a Python function that prints out the
first and last row of pascal triangle?
16 Write a Python Program to find the largest
number among the three input numbers?
17 Write a Python Program that ask the user
for a number is even or odd print out an
appropriate message to the user?
18 Write a Python Program that generate a
random number between 1 and 9 (including 1
and 9). Ask the user to guess the number,
then tell them whether they guessed too
low, too high, or exactly, right?
19 Write a Python Program (function!) that
takes a list and returns a new list that
contains all the elements of the first list
minus all the duplicates?
20 Write a Python Program that generates
password in Python. Be creative with how
you generate passwords - strong passwords
have a mix of lowercase letters, uppercase
letters, numbers, and symbols. The
passwords should be random, generating a
new password every time the user asks for a
new password. Include your run-time code in
a main method?
21 Write a Python Program that a function that
takes an ordered list of numbers (a list
where the elements are in order from
smallest to largest) and another number.
The function decides whether or not the
given number is inside the list and returns
(then prints) an appropriate Boolean.
22 Write a Python Program that implement a
function that takes as input three
variables, and returns the largest of the
three. Do this without using the Python max
() function!?
23 Write a Python Program that for this
exercise, we will keep track of when our
friend’s birthdays are, and be able to find
that information based on their name.
Create a dictionary (in your file) of names
and birthdays. When you run your program,
it should ask the user to enter a name, and
return the birthday of that person back to
them.
24 Write a Python Program to create a module?

You might also like