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

CSE 215L: Programming Language II Lab Faculty: Silvia Ahmed, Sec - 9, 10

This document provides instructions for 10 tasks for CSE 215L Programming Language II Lab. It details how to complete each task, including using Math.PI for pi, the final keyword for constants, converting integers to double for division, calculating percentages as fractions out of 100, using proper brackets for calculations, using tabs or "\t" to add spacing in outputs, and writing outputs exactly as given in samples including capitalization, spaces and numbers. Students are told to find and correct any mistakes in their work for Task 01 based on the guidance provided for all tasks.

Uploaded by

Zahin Khan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

CSE 215L: Programming Language II Lab Faculty: Silvia Ahmed, Sec - 9, 10

This document provides instructions for 10 tasks for CSE 215L Programming Language II Lab. It details how to complete each task, including using Math.PI for pi, the final keyword for constants, converting integers to double for division, calculating percentages as fractions out of 100, using proper brackets for calculations, using tabs or "\t" to add spacing in outputs, and writing outputs exactly as given in samples including capitalization, spaces and numbers. Students are told to find and correct any mistakes in their work for Task 01 based on the guidance provided for all tasks.

Uploaded by

Zahin Khan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

CSE 215L: Programming Language

II Lab
Faculty: Silvia Ahmed,
Sec – 9, 10
Lab 01 – Spring 2021
Task 01 and Task 02
• Do them yourself. Very easy to do them.
Task 03 and Task 04
• Use Math.PI for pi.
• Another approach is using final keyword for a constant.
Remember to use all capital letters for the variable name.
• For example: final double PI = 3.14
Task 05
• While doing division between two integers, convert one to
double.
• You can write 9.0/5 or 9/5.0 as both are correct but do not
write 9/5.s
Task 06
• When you have a percentage, you need to divide the number
by 100. So, 15% = 15/100.
Task 07, Task 08 and Task
09
• Use proper brackets as you need to calculate properly.
• V2/2a should be written as: (v * v) /(2 * a) or Math.pow(v, 2)/
(2 * a). Math .pow always results in a double value.
Task 10
• Use tab or “\t” for the space. First calculate the result and print
the result sequentially using tab.
• Then go to a new line and do the same.
• Search internet and find your confusion about using tab.
Attention!!
• You have to write the output exactly as given in the sample
input and output.
• Notice the Capital letters, spaces and numbers.
• Now go back again to the Task 01 and find your mistakes from
all the tasks.
• Correct yourself! 

You might also like