Вы находитесь на странице: 1из 2

Hindusthan College of Engineering And Technology

Approved by AICTE, New Delhi, Accredited with ‘A’ Grade by NAAC


(An Autonomous Institution, Affiliated to Anna University, Chennai)
Coimbatore – 641 032
DEPARTMENT OFCOMPUTER APPLICATIONS

Students with Even Register Numbers should take this assignment

Course Code & Name 16CA5202 & PYTHON PROGRAMMING


Branch MCA
Semester FIVE
Batch 2017 – 2020
Assignment Number TWO
Last Date of Submission 06.SEP.2019

Register No :
Submitted By Name :
(EVEN)

Submitted To Mrs. M.Nirmala , AP / MCA


Submitted Date
Verified By
Marks Alloted / 25
Converted to 5

1. Retrieve all the words starting with ‘b’ or ‘B’ from the following text.
Betty bought a bit of butter, But the butter was so bitter, So she bought some better
butter, To make the bitter butter better.

2. Split the following irregular sentence into words


Input: A, very very; irregular_sentence
Output : A very very irregular sentence

3. Clean up the following tweet so that it contains only the user’s message. That is,
remove all URLs, hashtags, mentions, punctuations, RTs and CCs.
Input Text : Good advice! RT @TheNextWeb: What I would do differently if I was
learning to code today http://t.co/lbwej0pxOd cc: @garybernhardt #rstats
Output Text : Good advice What I would do differently if I was learning to code today
Hindusthan College of Engineering And Technology
Approved by AICTE, New Delhi, Accredited with ‘A’ Grade by NAAC
(An Autonomous Institution, Affiliated to Anna University, Chennai)
Coimbatore – 641 032
DEPARTMENT OFCOMPUTER APPLICATIONS
4. Write a Python program to convert a date of yyyy-mm-dd format to dd-mm-
yyyy
Input Format: 2026-01-02
Output Format: 02-01-2026

5. Write a Python program to find sequences of one upper case letter followed by
lower case letters
Input Text : aab_Abbbc
Output Text :Matched

6. Write a Python program to check a decimal with a precision of 2.


Input Text : 123.56, 345,678
Output Text : Matched, Unmatched

7. Write a Python program to find all five characters long word in a string.
Input Text : 'The quick brown fox jumps over the lazy dog.'
Output Text : ['quick', 'brown', 'jumps']

8. Write a Python program to replace all occurrences of space, comma, or dot with
a colon
Input Text : 'Python Exercises, PHP exercises.
Output Text : Python:Exercises::PHP:exercises: