0% found this document useful (0 votes)
88 views

CSE - Problem Solving - Assignment

This document contains 17 Python coding problems involving basic mathematical and logical operations such as printing text, adding numbers, finding square roots, calculating area of shapes, converting between units, checking number properties, and computing sums and products. Each problem is briefly outlined and numbered to correspond to the coding exercises.

Uploaded by

Om Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views

CSE - Problem Solving - Assignment

This document contains 17 Python coding problems involving basic mathematical and logical operations such as printing text, adding numbers, finding square roots, calculating area of shapes, converting between units, checking number properties, and computing sums and products. Each problem is briefly outlined and numbered to correspond to the coding exercises.

Uploaded by

Om Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

CSE – Problem Solving

Assignment 2
Om Singh (20BCE10990)
Python Code Exercise

Table of Contents
PROBLEM 1 :-...................................................................................................2
PROBLEM 2 :-...................................................................................................3
PROBLEM 3 :-...................................................................................................4
PROBLEM 4 :-...................................................................................................5
PROBLEM 5 :-...................................................................................................7
PROBLEM 6 :-...................................................................................................8
PROBLEM 7 :-...................................................................................................9
PROBLEM 8 :-.................................................................................................10
PROBLEM 9 :-.................................................................................................11
PROBLEM 10 :-..............................................................................................12
PROBLEM 11 :-..............................................................................................13
PROBLEM 12 :-..............................................................................................14
PROBLEM 13 :-..............................................................................................15
PROBLEM 14 :-..............................................................................................16
PROBLEM 15 :-..............................................................................................17
PROBLEM 16 :-..............................................................................................18
PROBLEM 17 :-..............................................................................................19
Problem 1 :-
Write a python program to print Hello World! :
Problem 2 :-
Write a python program to add two numbers :
Problem 3 :-
Write a python program to find the square root :
Problem 4 :-
Write a python program to calculate the area of a triangle :
Problem 5 :-
Write a python program to convert kilometres to miles:
Problem 6 :-
Write a python program to convert Celsius to Fahrenheit:
Problem 7 :-
Write a python program to check if a number is positive,
negative or 0 :
Problem 8 :-
Write a python program to check if a number is odd or even :
Problem 9 :-
Write a python program to find the largest among three
numbers :
Problem 10 :-
Write a python program to check a prime number:
Problem 11 :-
Write a python program to display the multiplication table :
Problem 12 :-
Write a python program to count odd and even numbers:
Problem 13 :-
Write a python program to compute the sum of n natural
numbers:
Problem 14 :-
Write a program to print ‘Hello’ 5 times:
Problem 15 :-
Write a python program to find the area of a circle:
Problem 16 :-
Write a python program to find the age validity (valid voter
or not):
Problem 17 :-
Write a python program to find the sum of first 100 natural
numbers:

You might also like