The document outlines a series of Python programming tasks that involve conditional statements and loops. Tasks include finding numbers divisible by 7 and multiples of 5, converting temperatures, constructing patterns, generating Fibonacci series, summing list items, counting specific strings, removing duplicates, sorting dictionaries, merging dictionaries, removing keys, and finding maximum and minimum values in a dictionary. These exercises aim to enhance programming skills in Python.
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 ratings0% found this document useful (0 votes)
6 views1 page
Python Practice Program
The document outlines a series of Python programming tasks that involve conditional statements and loops. Tasks include finding numbers divisible by 7 and multiples of 5, converting temperatures, constructing patterns, generating Fibonacci series, summing list items, counting specific strings, removing duplicates, sorting dictionaries, merging dictionaries, removing keys, and finding maximum and minimum values in a dictionary. These exercises aim to enhance programming skills in Python.
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/ 1
Python conditional statements and loops
1. Write a Python program to find those numbers which are divisible by 7
and multiples of 5 2. Write a Python program to convert temperatures to and from Celsius and Fahrenheit. [ Formula : c/5 = f-32/9 [ where c = temperature in celsius and f = temperature in fahrenheit ] 3. Write a Python program to construct the following pattern, using a nested for loop. * * * * * * * * * * * * * * * * * * * * * * * * * 4. Write a Python program to get the Fibonacci series between 0 and 50. Note : The Fibonacci Sequence is the series of numbers : 0, 1, 1, 2, 3, 5, 8, 13, 21, .... 5. Write a Python program to sum all the items in a list. 6. Write a Python program to count the number of strings from a given list of strings. The string length is 2 or more and the first and last characters are the same. Sample List : ['abc', 'xyz', 'aba', '1221'] Expected Result : 2 7. Write a Python program to remove duplicates from a list. 8. Write a Python script to sort (ascending and descending) a dictionary by value. 9. Write a Python script to merge two Python dictionaries. 10. Write a Python program to remove a key from a dictionary. 11. Write a Python program to get the maximum and minimum values of a dictionary.