CSE110 Assignment 2
This assignment is to guide in solving basic programming problems using loop in Python.
Write your name, student ID and theory section number below:
In [ ]: #STUDENT NAME:
#CSE110 SECTION: 14
Write the code in Python for following problems:
[MUST MAINTAIN VARIABLE NAMING CONVENTIONS FOR ALL THE TASKS]
Task 1
Write python program, which prints the following sequences of values in loops:
a) 24, 18, 12, 6, 0, -6\ b) -10, -5, 0, 5, 10, 15, 20\ c) 18, 27, 36, 45, 54, 63\ d) 18,-27, 36,-45,54,-63
=====================================================================
Hints(1): Use a while loop for solving these problems.
Hints(2): We are already familiar with the print() function. But when we use it to print any value it automatically adds an additional newline after
each print statement.
For example:\ print(1)\ print(2)
Output:\ 1\ 2
=====================================================================
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD