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

Compiler Lab: Python String Tasks

The document outlines lab tasks for a Compiler Construction course, focusing on various programming exercises in Python. Tasks include validating strings for vowels, binary patterns, alphanumeric combinations, and numeric checks, as well as counting alphabets in a given string. These exercises aim to enhance students' understanding of string manipulation and validation in programming.

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)
6 views1 page

Compiler Lab: Python String Tasks

The document outlines lab tasks for a Compiler Construction course, focusing on various programming exercises in Python. Tasks include validating strings for vowels, binary patterns, alphanumeric combinations, and numeric checks, as well as counting alphabets in a given string. These exercises aim to enhance students' understanding of string manipulation and validation in programming.

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

 Run all the built-in string functions provided in lab.


 Write a program in python that takes natural language (a to z) or (A to Z) which
contains at least one vowel. If the entered word by the user doesn’t contain a vowel
print ‘Invalid String’.
 Write a python program in which the language is of 0’s and 1’s in which the entered
string of 0’s and 1’s should contain two zeros in the end and prints it’s a valid string
otherwise print its invalid.
 Write a program in python in which the entered string should contain a combination
of alphabets and numbers to validate the input string.
 Take user input as a numeric number and check using isnumeric() that whether the
entered input is numeric or not.
 Let’s suppose you are given a string “Compiler construction lab” count the total
number of alphabets and print the alphabets.

You might also like