About Me

header ads

Julia (BDSL456D)

Julia

Course Code BDSL456D 
CIE Marks 50
Teaching Hours/Week (L: T:P: S) 0:0:2:0 
SEE Marks 50
Total Hours of Pedagogy 24 
Total Marks 100
Credits 01



Experiments

1 a. Develop a Julia program to simulate a calculator (for integer and real numbers).

b. Develop a Julia program to add, subtract, multiply and divide complex numbers.

c. Develop a Julia program to evaluate expressions having mixed data types (integer, real, floating-point

number and complex).

[Refer Book 2: Chapter 3, 4]

2 a. Develop a Julia program for the following problem: A computer repair shop charges $100 per hour for labour plus the cost of any parts used in the repair. However, the minimum charge for any job is $150.

Prompt for the number of hours worked and the cost of parts (which could be $0) and print the charge

for the job.

b. Develop a Julia program to calculate a person’s regular pay, overtime pay and gross pay based on the

following: If hours worked is less than or equal to 40, regular pay is calculated by multiplying hours

worked by rate of pay, and overtime pay is 0. If hours worked is greater than 40, regular pay is

calculated by multiplying 40 by the rate of pay, and overtime pay is calculated by multiplying the hours

in excess of 40 by the rate of pay by 1.5. Gross pay is calculated by adding regular pay and overtime pay.

[Refer Book 1: Chapter 3]

3 a. An amount of money P (for principal) is put into an account which earns interest at r% per annum. So,

at the end of one year, the amount becomes P + P×r/100. This becomes the principal for the next year.

Develop a Julia program to print the amount at the end of each year for the next 10 years. However, if

the amount ever exceeds 2P, stop any further printing. Your program should prompt for the values of P

and r.

b. Develop a Julia program which reads numbers from a file (input.txt) and finds the largest number,

smallest number, count, sum and average of numbers.

[Refer Book 1: Chapter 4]

4 a. Develop a Julia program and two separate functions to calculate GCD and LCM.

b. Develop a Julia program and a recursive function to calculate factorial of a number.

c. Develop a Julia program and a recursive function to generate Fibonacci series.

[Refer Book 1: Chapter 5]

5 a. Develop a Julia program which reads a string (word) and prints whether the word is palindrome.

b. Develop a Julia program which reads and prints the words present in a file (input.txt) having Random

Data in which words are dispersed randomly (Assumption: a word is a contiguous sequence of letters.

A word is delimited by any non-letter character or end-of-line).

[Refer Book 1: Chapter 6]

6 a. Develop a Julia program to determine and print the frequency with which each letter of the alphabet is

used in a given line of text.

Template for Practical Course and if AEC is a practical Course Annexure-V

b. A survey of 10 pop artists is made. Each person votes for an artist by specifying the number of the artist

(a value from 1 to 10). Develop a Julia program to read the names of the artists, followed by the votes,

and find out which artist is the most popular.

[Refer Book 1: Chapter 7]

7 a. Given a line of text as input, develop a Julia program to determine the frequency with which each letter

of the alphabet is used (make use of dictionary)

b. Develop a Julia program to fetch words from a file with arbitrary punctuation and keep track of all the

different words found (make use of set and ignore the case of the letters: e.g. to and To are treated as

the same word).

[Refer Book 1: Chapter 10]

8 a. Develop a Julia program to evaluate expressions consisting of rational, irrational number and floatingpoint numbers)

b. Develop a Julia program to determine the following properties of a matrix: determinant, inverse, rank,

upper & lower triangular matrix, diagonal elements, Euclidean norm and Square Root of a Matrix.

[Refer Book 2: Chapter 5, 8]

9 a. Develop a Julia program to determine addition and subtraction of two matrices (element -wise).

b. Develop a Julia program to perform multiplication operation on matrices: scalar multiplication,

element-wise multiplication, dot product, cross product.

[Refer Book 2: Chapter 8]

10 a. Develop a Julia program to generate a plot of (solid & dotted) a function: y=x2 (use suitable data points

for x).

b. Develop a Julia program to generate a plot of mathematical equation: y = sin(x) + sin(2x).

c. Develop a Julia program to generate multiple plots of mathematical equations: y = sin(x) + sin(2x) and y

= sin(2x) + sin(3x).

[Refer Book 2: Chapter 13]




Suggested Learning Resources:

● BOOK 1: Julia – Bit by Bit (Programming for Beginners), by Noel Kalicharan, Springer: ISBN 978-

3-030-73935-5, doi: https://doi.org/10.1007/978-3-030-73936-2, 2021.

● BOOK 2: Beginning Julia Programming (For Engineers and Scientists), by Sandeep Nagar,

Apress-Springer: ISBN 978-1-4842-3170-8, doi: https://doi.org/10.1007/978-1-4842-3171-5,

2017.

Post a Comment

0 Comments