What is tuple in Python? Explain various methods with example.
ASSIGNMENT ASSIGNMENT Q.4 What is tuple in Python? Explain various methods with example. Answer :-Â A tuple is an immutable and ordered collection in Python used to store multiple items in a single variable. Like lists, tuples can hold elements of different data types, but unlike lists, tuples cannot be modified (i.e., elements cannot be […]
Define Types of Variable in Python.
ASSIGNMENT ASSIGNMENT Q.3 Define Types of Variable in Python. Answer :-Â Types of Variables in Python In Python, variables are used to store data, and the type of variable depends on the type of data it holds. Python is a dynamically typed language, meaning you do not need to declare the type of a variable […]
What is User Define Function? Write a Difference Between Structure and Union.
ASSIGNMENT ASSIGNMENT Q.2 What is User Define Function? Write a Difference Between Structure and Union. Answer :-Â A user-defined function in C++ is a function created by the programmer to perform a specific task. Unlike pre-defined functions (e.g., `main()` or library functions like `sqrt()`), user-defined functions allow developers to encapsulate reusable code blocks, improve code […]
What is Array ? Explain 2D array with example?
ASSIGNMENT ASSIGNMENT Q.1 What is Array ? Explain 2D array with example? Answer :-Â An array in programming is a collection of elements, all of the same data type, stored in contiguous memory locations. Arrays provide a way to store multiple values under a single variable name, making it easier to handle large datasets. Each […]
Write a program to enter P, T, R and calculate Simple Interest in PLSQL block.
Practical Practice 17 Oracle Practice Write a program to enter P, T, R and calculate Simple Interest in PLSQL block. Write a program to enter P, T, R and calculate Simple Interest in PLSQL block. SOLUTION –Static code set serveroutput on; DECLARE P NUMBER :=15000; T NUMBER := 5; R NUMBER(3,2) := 3.5; SI NUMBER; […]
Write a program to enter marks of five subjects and calculate total, average and percentage in PLSQL block.
Practical Practice 16 Oracle Practice Write a program to enter marks of five subjects and calculate total, average and percentage in PLSQL block. Write a program to enter marks of five subjects and calculate total, average and percentage in PLSQL block. SOLUTION –Static code set serveroutput on; DECLARE rno number := 5; name varchar2(100) :=’abc’; […]
Write a program to calculate area of an equilateral triangle in PLSQL block.
Practical Practice 15 Oracle Practice Write a program to calculate area of an equilateral triangle in PLSQL block. Write a program to calculate area of an equilateral triangle in PLSQL block. SOLUTION –Static code set serveroutput on; DECLARE side NUMBER := 3; area NUMBER; BEGIN area := (SQRT(3) / 4) * POWER(side, 2); DBMS_OUTPUT.PUT_LINE(‘The area […]
Write a program to enter base and height of a triangle and find its area in PLSQL block.
Practical Practice 14 Oracle Practice Write a program to enter base and height of a triangle and find its area in PLSQL block. Write a program to enter base and height of a triangle and find its area in PLSQL block. SOLUTION –Static code set serveroutput on; DECLARE base_triangle NUMBER := 10 ; height_triangle NUMBER […]
Write a program to enter two angles of a triangle and find the third angle in PLSQL block.
Practical Practice 13 Oracle Practice Write a program to enter two angles of a triangle and find the third angle in PLSQL block. Write a program to enter two angles of a triangle and find the third angle in PLSQL block. SOLUTION –Static code DECLARE angle1 NUMBER := 70; angle2 NUMBER := 80; angle3 NUMBER […]
Write a program to enter any number and calculate its square root in PLSQL block.
Practical Practice 12 Oracle Practice Write a program to enter any number and calculate its square root in PLSQL block. Write a program to enter any number and calculate its square root in PLSQL block. SOLUTION –Static code DECLARE num NUMBER := 25; sqrt_result NUMBER; BEGIN sqrt_result := SQRT(num); DBMS_OUTPUT.PUT_LINE(‘Square root of ‘ || num […]