Lab Printouts CSE - AIML & DS
Lab Printouts CSE - AIML & DS
Productivity Tools:
Experiment 7: Basic HTML tags,Introduction to HTML5 and its tags, Introduction to CSS3 and its
properties. Preparation of a simple website/ homepage,
Assignment: Develop your home page using HTML Consisting of your photo, name, address and education
details as a table and your skill set as a list.
Features to be covered:- Layouts, Inserting text objects, Editing text objects, Inserting Tables, Working
with menu objects, Inserting pages, Hyper linking, Renaming, deleting, modifying pages, etc.,
Internet of Things (IoT): IoT fundamentals, applications, protocols, communication models, architecture,
IoT devices
Office Tools:
Experiment 8: Demonstration and Practice on Text Editors like Notepad++, Sublime Text, Atom, Brackets,
Visual code, etc
Experiment 9: Demonstration and practice on Microsoft Word, Power Point, Microsoft Excel .
DEPARTMENT OF CSE - ARTIFICIAL INTELLIGENCE & MACHINE LEARNING
1) Write a program that asks the user for a weight in kilograms and converts it to pounds.
There are 2.2 pounds in a kilogram.
2) Write a program that asks the user to enter three numbers (use three separate input
statements). Create variables called total and average that hold the sum and average of the
three numbers and print out the values of total and average.
3) Write a program that uses a for loop to print the numbers 8, 11, 14, 17, 20, . . . , 83, 86, 89.
4) Write a program that asks the user for their name and how many times to print it. The
program should print out the user’s name the specified number of times.
5) Use a forloop to print a triangle like the one below. Allow the user to specify how high
the triangle should be.
*
**
***
****
6) Generate a random number between 1 and 10. Ask the user to guess the number and print
a message based on whether they get it right or not.
7) Write a program that asks the user for two numbers and prints Close if the numbers are
within .001 of each other and Not close otherwise.
8) Write a program that asks the user to enter a word and prints out whether that word
contains any vowels.
9) Write a program that asks the user to enter two strings of the same length. The program
should then check to see if the strings are of the same length. If they are not, the program
should print an appropriate message and exit. If they are of the same length, the program
should alternate the characters of the two strings. For example, if the user enters
abcdeandABCDE the program should print out AaBbCcDdEe.
10) Write a program that asks the user for a large integer and inserts commas into it according
to the standard American convention for commas in large numbers. For instance, if the
user enters 1000000, the output should be 1,000,000.
11) In algebraic expressions, the symbol for multiplication is often left out, as in 3x+4y or
3(x+5). Computers prefer those expressions to include the multiplication symbol, like
3*x+4*y or 3*(x+5). Write a program that asks the user for an algebraic expression and
then inserts multiplication symbols where appropriate.
12) Write a program that generates a list of 20 random numbers between 1 and 100.
(a) Print the list.
(b) Print the average of the elements in the list.
(c) Print the largest and smallest values in the list.
(d) Print the second largest and second smallest entries in the list
(e) Print how many even numbers are in the list.
13) Write a program that asks the user for an integer and creates a list that consists of the
factors of that integer.
14) Write a program that generates 100 random integers that are either 0 or 1. Then find the
longest run of zeros, the largest number of zeros in a row. For instance, the longest run of
zeros in [1,0,1,1,0,0,0,0,1,0,0] is 4.
15) Write a program that removes any repeated items from a list so that each item appears at
most once. For instance, the list [1,1,2,3,4,3,0,0] would become [1,2,3,4,0].
16) Write a program that asks the user to enter a length in feet. The program should then give
the user the option to convert from feet into inches, yards, miles, millimeters, centimeters,
meters, or kilometers. Say if the user enters a 1, then the program converts to inches, if
they enter a 2, then the program converts to yards, etc. While this can be done with if
statements,it is much shorter with lists and it is also easier to add new conversions if you
use lists.
17) Write a function called sum_digitsthat is given an integer num and returns the sum of the
digits of num.
18) Write a function called first_diffthat is given two strings and returns the first location in
which the strings differ. If the strings are identical, it should return -1.
19) Write a function called number_of_factorsthat takes an integer and returns how many
factors the number has.
20) Write a function called is_sortedthat is given a list and returns True if the list is sorted and
False otherwise.
21) Write a function called root that is given a number x and an integer n and returns x1/n. In
the function definition, set the default value of n to 2.
22) Write a function called primes that is given a number n and returns a list of the first n
primes. Let the default value of n be 100.
23) Write a function called merge that takes two already sorted lists of possibly different
lengths, and merges them into a single sorted list.
(a) Do this using the sort method. (b) Do this without using the sort method.
24) Write a program that asks the user for a word and finds all the smaller words that can be
made from the letters of that word. The number of occurrences of a letter in a smaller
word can’t exceed the number of occurrences of the letter in the user’s word.
25) Write a program that reads a file consisting of email addresses, each on its own line. Your
program should print out a string consisting of those email addresses separated by
semicolons.
26) Write a program that reads a list of temperatures from a file called temps.txt, converts
those temperatures to Fahrenheit, and writes the results to a file called ftemps.txt.
27) Write a class called Product. The class should have fields called name, amount, and price,
holding the product’s name, the number of items of that product in stock, and the regular
price of the product. There should be a method get_pricethat receives the number of items
to be bought and returns a the cost of buying that many items, where the regular price is
charged for orders of less than 10 items, a 10% discount is applied for orders of between
10 and 99 items, and a 20% discount is applied for orders of 100 or more items. There
should also be a method called make_purchasethat receives the number of items to be
bought and decreases amount by that much.
28) Write a class called Time whose only field is a time in seconds. It should have a method
called convert_to_minutesthat returns a string of minutes and seconds formatted as in the
following example: if seconds is 230, the method should return '5:50'. It should also have a
method called convert_to_hoursthat returns a string of hours, minutes, and seconds
formatted analogously to the previous method.
29) Write a class called Converter. The user will pass a length and a unit when declaring an
object from the class—for example, c = Converter(9,'inches'). The possible units are
inches, feet, yards, miles, kilometers, meters, centimeters, and millimeters. For each of
these units there should be a method that returns the length converted into those units. For
example, using the Converter object created above, the user could call c.feet() and should
get 0.75 as the result.
Exercise -1 (Searching)
Write C program that use both recursive and non recursive functions to perform Linear search for
a Key value in a given list.
b) Write C program that use both recursive and non recursive functions to perform Binary
search for a Key value in a given list.
Exercise – 2 (Sorting-I)
a) Write C program that implement Bubble sort, to sort a given list of integers in ascending order
b) Write C program that implement Quick sort, to sort a given list of integers in ascending order
c) Write C program that implement Insertion sort, to sort a given list of integers
in ascending order
Exercise -3 (Sorting-II)
a) Write C program that implement radix sort, to sort a given list of integers in ascending order
b) Write C program that implement merge sort, to sort a given list of integers in ascending order
Exercise -5(Queue)
a) Write C program that implement Queue (its operations) using arrays.
b) Write C program that implement Queue (its operations) using linked lists
Exercise -6 (Stack)
a) Write C program that implement stack (its operations) using arrays
b) Write C program that implement stack (its operations) using Linked list
c) Write a C program that uses Stack operations to evaluate postfix expression
Exercise - 1 (Basics)
a) Write a JAVA program to display default value of all primitive data type of JAVA
b) Write a java program that display the roots of a quadratic equation ax2+bx=0. Calculate the discriminate
D and basing on value of D, describe the nature of root.
c) Five Bikers Compete in a race such that they drive at a constant speed which may or may not be the same
as the other. To qualify the race, the speed of a racer must be more than the average speed of all 5 racers.
Take as input the speed of each racer and print back the speed of qualifying racers.
Exercise - 4 (Methods)
a) Write a JAVA program to implement constructor overloading.
b) Write a JAVA program implement method overloading.
Exercise - 5 (Inheritance)
a) Write a JAVA program to implement Single Inheritance
b) Write a JAVA program to implement multi level Inheritance
c) Write a java program for abstract class to find areas of different shapes
Exercise - 7 (Exception)
a) Write a JAVA program that describes exception handling mechanism
b) Write a JAVA program Illustrating Multiple catch clauses
Exercise – 12 (Packages)
a) Write a JAVA program illustrate class path
b) Write a case study on including in class path in your os environment of your package.
c) Write a JAVA program that import and use the defined your package in the previous Problem
Exercise - 13 (Applet)
a) Write a JAVA program to paint like paint brush in applet.
b) Write a JAVA program to display analog clock using Applet.
c) Write a JAVA program to create different shapes and fill colors using Applet.
List of Exercises:
1. Creation, altering and droping of tables and inserting rows into a table (use constraints while creating
tables) examples using SELECT command.
2. Queries (along with sub Queries) using ANY, ALL, IN, EXISTS, NOTEXISTS,
UNION, INTERSET, Constraints. Example:- Select the roll number and name of the student who
secured fourth rank in the class.
3. Queries using Aggregate functions (COUNT, SUM, AVG, MAX and MIN), GROUP BY, HAVING
and Creation and dropping of Views.
4. Queries using Conversion functions (to_char, to_number and to_date), string
functions (Concatenation, lpad, rpad, ltrim, rtrim, lower, upper, initcap, length, substr and instr),
date functions (Sysdate, next_day, add_months, last_day, months_between, least, greatest,
trunc, round, to_char, to_date)
5.
i. Create a simple PL/SQL program which includes declaration section, executable section and
exception –Handling section (Ex. Student marks can be selected from the table and printed
for those who secured first class and an exception can be raised if no records were found)
ii. Insert data into student table and use COMMIT, ROLLBACK and SAVEPOINT in
PL/SQL block.
6. Develop a program that includes the features NESTED IF, CASE and CASE expression.
The program can be extended using the NULLIF and COALESCE functions.
7. Program development using WHILE LOOPS, numeric FOR LOOPS, nested loops using ERROR
Handling, BUILT –IN Exceptions, USE defined Exceptions, RAISE- APPLICATION ERROR.
8. Programs development using creation of procedures, passing parameters IN and OUT
of PROCEDURES.
9. Program development using creation of stored functions, invoke functions in SQL Statements and
write complex functions.
10. Develop programs using features parameters in a CURSOR, FOR UPDATE CURSOR, WHERE
CURRENT of clause and CURSOR variables.
11. Develop Programs using BEFORE and AFTER Triggers, Row and Statement Triggers
and INSTEAD OF Triggers
12. Create a table and perform the search operation on table using indexing and non-indexing
techniques.
DEPARTMENT OF CSE – DATA SCIENCE
R PROGRAMMING LAB
II Year – II Semester
Lab Experiments:
Week 1:
Installing R and RStudio
Basic functionality of R, variable, data types in R
Week 2:
a) Implement R script to show the usage of various operators available in R language.
b) Implement R script to read person‘s age from keyboard and display whether he
is eligiblefor voting ornot.
c) Implement R script to find biggest number between two numbers.
d) Implement R script to check the given year is leap year ornot.
Week 3:
a) Implement R Script to create a list.
b) Implement R Script to access elements in the list.
c) Implement R Script to merge two or more lists. Implement R Script to perform matrix operation
Week 4:
Implement R script to perform following operations:
a) various operations on vectors
b) Finding the sum and average of given numbers using arrays.
c) To display elements of list in reverse order.
d) Finding the minimum and maximum elements in the array.
Week 5:
a) Implement R Script to perform various operations on matrices
b) Implement R Script to extract the data from dataframes.
c) Write R script to display file contents.
d) Write R script to copy file contents from one file to another
Week 6:
a) Write an R script to find basic descriptive statistics using summary, str, quartile function
on mtcars& cars datasets.
b) Write an R script to find subset of dataset by using subset (), aggregate () functions on iris dataset
Week 7:
a) Reading different types of data sets (.txt, .csv) from Web or disk and writing in file in specific
disk location.
b) Reading Excel data sheet in R.
c) Reading XML dataset in R
Week 8:
a) Implement R Script to create a Pie chart, Bar Chart, scatter plot and Histogram (Introduction to
ggplot2 graphics)
b) Implement R Script to perform mean, median, mode, range, summary, variance,
standard deviation operations.
Week 9:
a) Implement R Script to perform Normal, Binomial distributions.
b) Implement R Script to perform correlation, Linear and multiple regression.
Week 10:
Introduction to Non-Tabular Data Types: Time series, spatial data, Network data.
Data Transformations: Converting Numeric Variables into Factors, Date Operations,
String Parsing, Geocoding
Week 11:
Introduction Dirty data problems: Missing values, data manipulation, duplicates, forms of data dates,
outliers, spelling
Week 12:
Data sources: SQLite examples for relational databases, Loading SPSS and SAS files, Reading from
Google Spreadsheets, API and web scraping examples
DEPARTMENT OF CSE - ARTIFICIAL INTELLIGENCE & MACHINE LEARNING
List of Experiments:
4. Design and development of Online Book Shop using JSP/Node.js & React.js
6. Design and development of online ticket reservation system using JSP/Node.js & React.js
9. Design and development of online job portal using JSP/Node.js & React.js
10. Design and development of Online Auction using JSP/Node.js & React.js
DEPARTMENT OF CSE - ARTIFICIAL INTELLIGENCE & MACHINE LEARNING
List of Experiments
1. Demonstrate Noise Removal for any textual data and remove regular expression pattern such as
3. Demonstrate object standardization such as replace social media slangs from a text.
6. Demonstrate Term Frequency – Inverse Document Frequency (TF – IDF) using python
8. Implement Text classification using naïve bayes classifier and text blob library.
10. Convert text to vectors (using term frequency) and apply cosine similarity to provide
In this problem, you are provided with tweet data to predict sentiment on electronic
products of netizens.
The objective of this task is to detect hate speech in tweets. For the sake of simplicity, we
say a tweet contains hate speech if it has a racist or sexist sentiment associated with it.
So, the task is to classify racist or sexist tweets from other tweets.