Advertisements
Advertisements
Why is it advised to close a file after we are done with the read and write operations? What will happen if we do not close it? Will some error message be flashed?
Concept: undefined >> undefined
What is the difference between the following set of statements (a) and (b):
- P = open(“practice.txt”,”r”)
P.read(10) - with open(“practice.txt”, “r”) as
P: x = P.read()
Concept: undefined >> undefined
Advertisements
Site any two differences between Single Row Functions and Aggregate Functions.
Concept: undefined >> undefined
Write the name of the functions to perform the following operation:
To display the day like “Monday”, and “Tuesday”, from the date when India got independence.
Concept: undefined >> undefined
Write the name of the functions to perform the following operation:
To display the specified number of characters from a particular position of the given string.
Concept: undefined >> undefined
Write the name of the functions to perform the following operation:
To display the name of the month in which you were born.
Concept: undefined >> undefined
Write the name of the functions to perform the following operation:
To display your name in capital letters.
Concept: undefined >> undefined
Write the output produced by the following SQL statement:
SELECT ROUND(342.9234, -1);
Concept: undefined >> undefined
Write the output produced by the following SQL statement:
SELECT LENGTH("Informatics Practices");
Concept: undefined >> undefined
Write the output produced by the following SQL statement:
SELECT YEAR(“1979/11/26”),
MONTH(“1979/11/26”), DAY(“1979/11/26”), MONTHNAME(“1979/11/26”);
Concept: undefined >> undefined
Write the output produced by the following SQL statement:
SELECT LEFT("INDIA", 3), RIGHT("Computer Science", 4), MID("Informatics", 3, 4), SUBSTR("Practices", 3);
Concept: undefined >> undefined
Sahil, a class X student, has just started understanding the basics of Internet and web technologies. He is a bit confused between the terms “World Wide Web” and “Internet”. Help him in understanding both terms with the help of suitable examples of each.
Concept: undefined >> undefined
List one advantage and disadvantage of using Cookies.
Concept: undefined >> undefined
Which function is used to display the total number of records from a table in a database?
Concept: undefined >> undefined
Differentiate between count() and count(*) functions in SQL with appropriate examples.
Concept: undefined >> undefined
Write the outputs of the SQL queries based on the relations Teacher and Placement given below:
Table: Teacher
| T_ID | Name | Age | Department | Date_of_join | Salary | Gender |
| 1 | Arunan | 34 | Computer Sc | 2019-01-10 | 12000 | M |
| 2 | Saman | 31 | History | 2017-03-24 | 20000 | F |
| 3 | Randeep | 32 | Mathematics | 2020-12-12 | 30000 | M |
| 4 | Samira | 35 | History | 2018-07-01 | 40000 | F |
| 5 | Raman | 42 | Mathematics | 2021-09-05 | 25000 | M |
| 6 | Shyam | 50 | History | 2019-06-27 | 30000 | M |
| 7 | Shiv | 44 | Computer Sc | 2019-02-25 | 21000 | M |
| 8 | Shalakha | 33 | Mathematics | 2018-07-31 | 20000 | F |
Table: Placement
| P_ID | Department | Place |
| 1 | History | Ahmedabad |
| 2 | Mathematics | Jaipur |
| 3 | Computer Sc | Nagpur |
- SELECT Department, avg(salary) FROM Teacher GROUP BY Department;
- SELECT MAX(Date_of_Join), MIN(Date_of_Join) FROM Teacher;
- SELECT Name, Salary, T.Department, Place FROM Teacher T, Placement P WHERE T.Department = P.Department AND Salary>20000;
- SELECT Name, Place FROM Teacher T, Placement P WHERE Gender = ’F’ AND T.Department = P.Department;
Concept: undefined >> undefined
Predict the output of the code given below:
s="welcome2cs"
n = len(s)
m=""
for i in range(0, n):
if (s[i] >= 'a' and s[i] <= 'm'):
m = m +s[i].upper()
elif (s[i] >= 'n' and s[i] <= 'z'):
m = m +s[i-1]
elif (s[i].isupper()):
m = m + s[i].lower()
else:
m = m +'&'
print(m)Concept: undefined >> undefined
Which function returns the sum of all elements of a list?
Concept: undefined >> undefined
Write the use and syntax for the following method:
dump()
Concept: undefined >> undefined
Define pickling in Python. Explain serialization and deserialization of Python object.
Concept: undefined >> undefined
