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

CSE110 Lab Assignment 2.HTML-1

This document provides instructions for Assignment 2 in CSE110, which involves writing Python code to print out specified sequences of numbers using loops. Students are asked to write their name, student ID, and section number, and then use while loops to print out the sequences (a) 24, 18, 12, 6, 0, -6, (b) -10, -5, 0, 5, 10, 15, 20, (c) 18, 27, 36, 45, 54, 63, and (d) 18,-27, 36,-45,54,-63. Hints are provided about using while loops and the print function.

Uploaded by

Shamsul Rahat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
300 views

CSE110 Lab Assignment 2.HTML-1

This document provides instructions for Assignment 2 in CSE110, which involves writing Python code to print out specified sequences of numbers using loops. Students are asked to write their name, student ID, and section number, and then use while loops to print out the sequences (a) 24, 18, 12, 6, 0, -6, (b) -10, -5, 0, 5, 10, 15, 20, (c) 18, 27, 36, 45, 54, 63, and (d) 18,-27, 36,-45,54,-63. Hints are provided about using while loops and the print function.

Uploaded by

Shamsul Rahat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like