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

Python Assignment 2

The document outlines various Python programming tasks, including checking if a number is positive or negative, displaying student grades, calculating factorials, generating Fibonacci series, and comparing control statements. It also discusses the differences between selection and iterative statements in Python, along with their advantages and applications. Additionally, it includes a task for exchanging values of two numbers using a temporary variable.
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)
2 views1 page

Python Assignment 2

The document outlines various Python programming tasks, including checking if a number is positive or negative, displaying student grades, calculating factorials, generating Fibonacci series, and comparing control statements. It also discusses the differences between selection and iterative statements in Python, along with their advantages and applications. Additionally, it includes a task for exchanging values of two numbers using a temporary variable.
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

Python Assignment 2

Construct a Python program to check whether a given number is positive or negative using
the if statement.

Write a Python program to display the grade of a student using the if-elif-else statement

Develop Python program to find the factorial of a given number using the while loop.

Create a Python program that generates the Fibonacci series using a for loop.

Compare the functionalities of break, continue, and pass statements in Python with suitable
examples..

Compare selection statements and iterative statements in Python. Explain their advantages,
differences, and applications with suitable examples.

Construct a Python-based solution to exchange the values of two numbers using a temporary
variable

You might also like