Tuesday, January 24, 2023

Unix Shell Programming Example for B.Sc, B.Tech, BCA, MCA

 4.Check a number whether it is odd positive,odd negative,even positive,even negative.

PROGRAM:

echo "enter a number:"
read n
if [ $n -ge 0 ]
then
    if [ `expr $n % 2` -eq 0 ]
    then
        echo "$n is a even positive number"
    else
        echo "$n is a odd positive number"
    fi
else
    if [ `expr $n % 2` -eq 0 ]
    then
        echo "$n is a even negative number"
    else
        echo "$n is a odd negative number"
    fi
fi


OUTPUT:


[bgc@localhost ~]$ sh 5.sh
enter a number:
3
3 is a odd positive number
[bgc@localhost ~]$ sh 5.sh
enter a number:
0
0 is a even positive number
[bgc@localhost ~]$ -9
bash: -9: command not found...
[bgc@localhost ~]$ sh 5.sh
enter a number:
-9
-9 is a odd negative number
[bgc@localhost ~]$ sh 5.sh
enter a number:
-10
-10 is a even negative number
[bgc@localhost ~]$

Unix Shell Programming Example for B.Sc, B.Tech, BCA, MCA

 3. Leap year checking.

PROGRAM:

echo "enter the year:"
read n
if [ `expr $n % 4` -eq 0 ]
then
    if [ `expr $n % 100` -eq 0 ]
    then
        if [ `expr $n % 400` -eq 0 ]
        then
            echo "$n is a leapyear"   #2000
        else
            echo "$n is not a leapyear"  #1900
        fi
    else
        echo "$n is a leapyear"  #1996
    fi
else
    echo "$n is not a leapyear"  #1997
fi

OUTPUT:

[bgc@localhost ~]$ sh pc2.sh
enter the year:
1996
1996 is a leapyear
[bgc@localhost ~]$ sh pc2.sh
enter the year:
2000
2000 is a leapyear
[bgc@localhost ~]$ sh pc2.sh
enter the year:
1997
1997 is not a leapyear
[bgc@localhost ~]$ sh pc2.sh
enter the year:
1900
1900 is not a leapyear
[bgc@localhost ~]$

Unix Shell Programming Example for B.Sc, B.Tech, BCA, MCA

 2. Use of for loop.

PROGRAM:

echo "Enter number of elements:"
read n
for i in `seq 1 $n`
do
    echo $i
done

OUTPUT:

[bgc@localhost ~]$ sh pc.sh
Enter number of elements:
3
1
2
3
[bgc@localhost ~]$ 

Unix Shell Programming Example for B.Sc, B.Tech, BCA, MCA

 1. Use of while loop.

PROGRAM:

echo "enter no. of elements:"
read n
a=0
while [ $a -ne $n ]
do
    echo $a
    ((a++))
done

OUTPUT:

[bgc@localhost ~]$ sh pc1.sh
enter no. of elements:
3
0
1
2
[bgc@localhost ~]$

Tuesday, October 18, 2022

Cloud computing QUESTION SET 1

 

1. Defining Cloud Computing.

2. Cloud Computing Is a Service.

3. 5-4-3 Principles of Cloud computing.

4. Give a brief note on the merits and demerits of cloud computing.

5. Cloud Architecture.

6. What is public cloud access networking?

7. Compare and contrast public and private clouds.

8. What is SLA? Are SLAs different for each type of cloud deployment?

9.  What are the characteristics of hybrid cloud?

10. What are the advantages of using the community cloud?

11. Define Infrastructure as a Service (IaaS).

12. Define Platform as a Service (PaaS).

13. Define Software as a Service (SaaS).

14. Write short notes on end user and service provider responsibilities of cloud service models with a suitable diagram.

15. Explain in detail about the overview of IaaS, PaaS, and SaaS with suitable diagrams.

16. Write short notes on pros and cons of IaaS, PaaS, and SaaS.

Tuesday, June 7, 2022

BIG DATA sample question

 What is Big Data? Advantages and disadvantages of Hadoop

How is HADOOP related to Big Data? 

Describe the main features of a big data in detail.

Hadoop – Architecture

Explain any one of the Hadoop components.

What is the difference between Hadoop and Traditional RDBMS?

What is NoSQL? 

Explain four types of NoSQL in brief.

SQL vs NoSQL

Tuesday, May 24, 2022

ARTIFICIAL INTELLIGENCE (AI)

 THEORY:  LINK

PRACTICAL: LINK

QUESTION SET:  LINK

ARTIFICIAL INTELLIGENCE PRACTICAL LIST

 1. FAMILY TREE RULES LIKE - PARENT, SON, DAUGHTER, GRANDPARENT, SIBLING

2. BASIC ARITHMETIC

3. AREA OF CIRCLE, RECTANGLE, TRIANGLE

4. C-F CONVERSION

5. LARGEST SMALLEST

6. LEAP YEAR CHECKING

7. FACTORIAL

8. FIBONACCI SERIES

9. LIST LENGTH

10 SEARCH IN LIST

11. SUM OF N NATURAL NUMBERS

12. GCD 

13. LCM

14. 

RITCH , KNIGHT AI CHAPTER WISE QUESTION :

 CHAPTER 1: LINK

 CHAPTER 2: LINK

 CHAPTER 3: LINK

 CHAPTER 4: LINK

 CHAPTER 5: LINK

 CHAPTER 6: LINK

 CHAPTER 7: LINK

 CHAPTER 8: LINK

 CHAPTER 9: LINK

 CHAPTER 10: LINK

 CHAPTER 11: LINK

 CHAPTER 12: LINK

 CHAPTER 13:  LINK

CHAPTER 14: LINK

 CHAPTER 15: LINK

CHAPTER 16: LINK

CHAPTER 17: LINK

  CHAPTER 18: LINK

 CHAPTER 19: LINK

CHAPTER 20: LINK

CHAPTER 21:LINK

 CHAPTER 22: LINK

 CHAPTER 23: LINK

CHAPTER 24: LINK

CHAPTER 25: LINK

CHAPTER 26: LINK



Monday, May 23, 2022

RITCH , KNIGHT AI CHAPTER WISE QUESTION CHAPTER 25:

 1. FACT 

2. RULES

3. PROLOG TERMINOLOGY

4. VARIABLE

5. CONTROL STRUCTURE

6. IF-ELSE,LOOP

7.RECURSION

8. LIST