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

Python Flow Control Assignment Guide

This document outlines an assignment for the Introduction to Python Programming course at PES Institute of Technology & Management. It includes a series of programming tasks focused on flow control statements in Python, such as checking even/odd numbers, finding the biggest of three numbers, and calculating factorials. The assignment aims to enhance students' understanding of Python programming through practical exercises.

Uploaded by

Pratibha S
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)
7 views2 pages

Python Flow Control Assignment Guide

This document outlines an assignment for the Introduction to Python Programming course at PES Institute of Technology & Management. It includes a series of programming tasks focused on flow control statements in Python, such as checking even/odd numbers, finding the biggest of three numbers, and calculating factorials. The assignment aims to enhance students' understanding of Python programming through practical exercises.

Uploaded by

Pratibha S
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

Prerana Educational and Social Trust®

PES Institute of Technology & Management


NH-206,Sagar Road,Shivamogga-577204

Department of Computer Science and Engineering

ASSIGNMENT 1
2022-23
Academic Year Semester II (CSE stream)
Introduction to Python Programming
Course
BPLCK105B
University Course Code
[Link] S
Course Instructor
ASSIGNMENT -2 PYTHON FLOW CONTROL STATEMENTS

Develop programs in Python to

1) Check whether a given number is even or odd.


2) Check whether a given number is divisible by 9 or not
3) Find the biggest of three numbers .
4) Ask the user to enter a number that is under20. If they enter a number that is 20 ormore,
display the message “Too high”, otherwise display “Thank you”.
5) Ask the user to enter their favorite colour. If they enter “red”, “RED” or “Red” display the
message “I like red too”, otherwise display the message “I don’t like [colour], I prefer
red”.
6) Ask the user to enter 1, 2 or 3. If they enter a 1, display the message “Thank you”, if they
enter a 2, display “Well done”, if they enter a 3, display “Correct”. If they enter anything
else, display “Error message”.
7) Ask the user to enter their name and then display their name three times using for loop .
8) Find the sum of n natural odd numbers
9) Find the factorial of a number using while loop
10) Ask how many people the user wants to invite to a party. If they enter a number
below10, ask for the names and after each name display “[name] has been invited”. If
they enter a number which is 10 or higher, display the message “Too many people”.
11) Print n natural even numbers
12) Print the multiplication table of a given number .
13) Find the roots of a quadratic equation
Prerana Educational and Social Trust®
PES Institute of Technology & Management
NH-206,Sagar Road,Shivamogga-577204

Department of Computer Science and Engineering

Finnd the roots of a quadratic equation

Course Instructor HOD

You might also like