= 'a' and s[i] <= 'm'): m = m +s[i].upper() elif (s[i] >= 'n' - Computer Science (Python) | Shaalaa.com" />= 'a' and s[i] <= 'm'): m = m +s[i].upper() elif (s[i] >= 'n' " />= 'a' and s[i] <= 'm'): m = m +s[i].upper() elif (s[i] >= 'n', Functions in SQL" />
हिंदी

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' - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

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)
एक पंक्ति में उत्तर
Advertisements

उत्तर

sELCcME&Cc

shaalaa.com
Functions in SQL
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2022-2023 (March) Sample

APPEARS IN

संबंधित प्रश्न

______ keyword is used to find out the number of values in a column?


Which method is used to get the row-id of the last modified row?


Which of the following belongs to an "aggregate function"?


The MAX () function finds the


What will be the output of the following SQL statement? 

SELECT DAY NAME (2022-04-08) 


Assertion (A): COUNf function ignores DISTINCT

Reason (R): DISTINCT ignores the duplicate values.


Which command is used to delete a table? (in SQL)


Identify Single Row function of MySQL among the following.


What will be returned by the given query? Select round(23456.1234, -2) = ______.


What will be returned by the given query? select mid("Computer", 2, 4) = ______.


Name a function of MySQL which is used to remove trailing and leading spaces from a string.


What will be returned by the given query? SELECT INSTR('INFORMATIONFORM', 'FOR') = ______.


Which of the following is not a text function?


What is the general format of UPPER() return type?


Which statement is used to count the number of rows in table?


Site any two differences between Single Row Functions and Aggregate Functions.


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.


Write the name of the functions to perform the following operation:

To display your name in capital letters.


Write the output produced by the following SQL statement:

SELECT LENGTH("Informatics Practices");


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”);


Differentiate between count() and count(*) functions in SQL with appropriate examples.


Which type of values will not be considered by SQL while executing the following statement?

SELECT COUNT(column name) FROM inventory;


If column “Fees” contains the data set (5000,8000,7500,5000,8000), what will be the output after the execution of the given query?

SELECT SUM (DISTINCT Fees) FROM student;


Based on the table STUDENT given here, write suitable SQL queries for the following:

Roll No Name Class Gender City Marks
1 Abhishek XI M Agra 430
2 Prateek XII M Mumbai 440
3 Sneha XI F Agra 470
4 Nancy XII F Mumbai 492
5 Himanshu XII M Delhi 360
6 Anchal XI F Dubai 256
7 Mehar X F Moscow 324
8 Nishant X M Moscow 429
  1. Display gender-wise highest marks.
  2. Display city-wise lowest marks.
  3. Display the total number of male and female students.

Explain the following SQL function using a suitable example.

MID()


Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×