0% found this document useful (0 votes)
5 views1 page

Python Programming Exercises and Solutions

The document outlines several Python programming tasks, including temperature conversion, pattern construction, student grading based on marks, prime number generation, factorial calculation using recursion, counting even and odd numbers, string reversal, file content manipulation, Turtle graphics creation, and solving the Towers of Hanoi problem. Each task emphasizes different programming concepts and techniques. The document serves as a guide for practicing Python programming skills.

Uploaded by

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

Python Programming Exercises and Solutions

The document outlines several Python programming tasks, including temperature conversion, pattern construction, student grading based on marks, prime number generation, factorial calculation using recursion, counting even and odd numbers, string reversal, file content manipulation, Turtle graphics creation, and solving the Towers of Hanoi problem. Each task emphasizes different programming concepts and techniques. The document serves as a guide for practicing Python programming skills.

Uploaded by

b.monish200718
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd

1) Program to convert the given temperature from Fahrenheit to Celsius

and vice versa depending upon user’s

Choice

2) Write a Python program to construct the following pattern, using a


nested loop

3) Program to calculate total marks, percentage and grade of a student.


Marks obtained in each of the five subjects

are to be input by user. Assign grades according to the following criteria:


Grade A: Percentage >=80 Grade B:

Percentage >=70 and 80 Grade C: Percentage >=60 and =40 and < 40

5) Write a Python script that prints prime numbers less than 20.

6) Program to find factorial of the given number using recursive function.

7)Write a Python program to count the number of even and odd numbers
from array of N numbers.

8) Write a Python class to reverse a string word by word.

11) Read a file content and copy only the contents at odd lines into a new
file.

12)Create a Turtle graphics window with specific size.

13) Write a Python program for Towers of Hanoi using recursion

You might also like