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

Compiler Construction Lab Tasks Guide

The document outlines lab tasks for a Compiler Construction course. Tasks include implementing a for loop with a range function, using a while loop with an else condition, creating a list of shapes with error handling, and merging and sorting two lists of random numbers. These exercises aim to enhance programming skills in Python.

Uploaded by

itshappyday777
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)
3 views1 page

Compiler Construction Lab Tasks Guide

The document outlines lab tasks for a Compiler Construction course. Tasks include implementing a for loop with a range function, using a while loop with an else condition, creating a list of shapes with error handling, and merging and sorting two lists of random numbers. These exercises aim to enhance programming skills in Python.

Uploaded by

itshappyday777
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

CSL 323 Compiler Construction

Lab Tasks

1. Implement for loop using range function to print numbers any range of numbers.
2. Using a combination of while loop and else condition print a number if it is less
than 5, otherwise else statement gets executed.
3. Make a list of shapes and then find a particular shape using If else statement and
if you enter a shape that doesn’t exist it should print an error message.
4. Make two list of random positive and negative numbers merge them and then
sort them using inbuilt sort function.

You might also like