Professional Documents
Culture Documents
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
1 Fundamentals
2 Strings
2 Strings
2 Strings
2 Strings
2 Strings
2 Strings
2 Strings
2 Strings
2 Strings
2 Strings
3 List
3 List
3 List
3 List
3 List
3 List
3 List
3 List
4 Tuples
4 Tuples
4 Tuples
5 Dictionary
5 Dictionary
5 Dictionary
5 Dictionary
5 Dictionary
5 Dictionary
5 Dictionary
5 Dictionary
5 Dictionary
5 Dictionary
5 Dictionary
6 Functions
6 Modules
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
6 Functions
7 Modules
7 Modules
8 Data File Handling
8 Data File Handling
8 Data File Handling
8 Data File Handling
8 Data File Handling
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
What are the rules for naming a variable?
What is a keyword? Give examples.
How do you find x raise to power y?
What is 5//2 ? 5/2 ?
Which value type does input() return?
How do we write comments in Python?
With which statement of Python Else clause is written?
When else clause of for loop is executed
Whats the purpose of break statement?
Whats the purpose of continue statement?
In nested loops . Break statement will terminate inner loop or outer loop or all loop
can we have else with for loop? While loop?
What do you mean by mutable data type?
What do you mean by immutable data type?
Which operator is used to find if an element is present in the seqquence or not?
Which are mutable data types- List, Tuple, 2 Strings, dictionary?
How do you find square root of a number in python?
Whats the difference between compiler and interpreter?
List is mutable or immutable?
Tuple, 2 Strings is mutable or immutable?
Whats the difference between Lists and Tuples?
Which operators can be used on Strings + - * /
Which type of quotes are used for Strings= single, dounle or triple?
How do I print reverse of a string?
How do I count number of characters present in a string?
Whats the difference between capitalize() function and title() functions of string?
Whats the purpose of s.upper()?
Whats the purpose of split() function w,r,t 2 Strings?
Whats the purpose of partition () function w,r,t 2 Strings?
How do you find position of a particular charater in a string?
Which module is required for string functions like upper(), title()
How can I remove 3rd element from the list?
Which function is used to remove all elements of a list?
How do you find largest number in a list of numbers?
How do I print reverse of a List?
How do I reverse a list?
inner loop
yes
in
List, dictionary - mutable
x**0.5 math.sqrt(x)
List is mutable
Immutable
+*
All
s[::-1]
len(s)
s.find(' char')
No module is required
L.pop(2) or del L[2]
clear()
max()
L[::-1]
L.reverse()
len(), range()
0-9
yes
To break a large program into small parts, code can be reused, increase readability.
asmany times as we wish
None
Its deleted
f=open("stu.dat","r+b") or w+b
Yes. pickle.dump(list,file)
No module is required
pickle
Stack is LIFO list in which insertion and deletion take place at one end?
L.append(x) - adds an element in the last.
L.pop()- removes from last
LIFO
reverse a string, infix to postfix, evaluation of postfix
2 Strings 23
2 Strings 24
2 Strings 25
2 Strings 26
2 Strings 27
2 Strings 28
2 Strings 29
2 Strings 30
2 Strings 31
3 List 32
3 List 33
3 List 34
3 List 35
3 List 36
3 List 37
3 List 38
3 List 39
4 Tuples 40
4 Tuples 41
4 Tuples 42
5 Dictionary 43
5 Dictionary 44
5 Dictionary 45
5 Dictionary 46
5 Dictionary 47
5 Dictionary 48
5 Dictionary 49
5 Dictionary 50
5 Dictionary 51
5 Dictionary 52
5 Dictionary 53
6 Functions 54
6 Modules 55
6 Functions 56
6 Functions 57
6 Functions 58
6 Functions 59
6 Functions 60
6 Functions 61
6 Functions 62
6 Functions 63
6 Functions 64
6 Functions 65
6 Functions 66
6 Functions 67
6 Functions 68
6 Functions 69
7 Modules 70
7 Modules 71
8 Data File Handling 72
8 Data File Handling 73
8 Data File Handling 74
8 Data File Handling 75
8 Data File Handling 76
8 Data File Handling 77
8 Data File Handling 78
8 Data File Handling 79
8 Data File Handling 80
8 Data File Handling 81
8 Data File Handling 82
8 Data File Handling 83
8 Data File Handling 84
8 Data File Handling 85
10 SQL 19
10 SQL 20
10 SQL 21
10 SQL 22
10 SQL 23
10 SQL 24
10 SQL 25
10 SQL 26
10 SQL 27
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL
10 SQL 28
10 SQL 29
10 SQL 30
10 SQL 31
10 SQL 32
10 SQL 33
10 SQL 34
10 SQL 35
10 SQL 36
10 SQL 37
10 SQL 38
10 SQL 39
10 SQL 40
10 SQL 41
10 SQL
What are the rules for naming a variable?
What is a keyword? Give examples.
How do you find x raise to power y?
What is 5//2 ? 5/2 ?
Which value type does input() return?
How do we write comments in Python?
With which statement of Python Else clause is written?
When else clause of for loop is executed
Whats the purpose of break statement?
Whats the purpose of continue statement?
In nested loops . Break statement will terminate inner loop or outer loop or all loops,
can we have else with for loop? While loop?
What do you mean by mutable data type?
What do you mean by immutable data type?
Which operator is used to find if an element is present in the seqquence or not?
Which are mutable data types- List, Tuple, 2 Strings, dictionary?
How do you find square root of a number in python?
Whats the difference between compiler and interpreter?
List is mutable or immutable?
Tuple, 2 Strings is mutable or immutable?
Whats the difference between Lists and Tuples?
Which operators can be used on Strings + - * /
Which type of quotes are used for Strings= single, dounle or triple?
How do I print reverse of a string?
How do I count number of characters present in a string?
Whats the difference between capitalize() function and title() functions of string?
Whats the purpose of s.upper()?
Whats the purpose of split() function w,r,t 2 Strings?
Whats the purpose of partition () function w,r,t 2 Strings?
How do you find position of a particular charater in a string?
Which module is required for string functions like upper(), title()
How can I remove 3rd element from the list?
Which function is used to remove all elements of a list?
How do you find largest number in a list of numbers?
How do I print reverse of a List?
How do I reverse a list?
Whats the difference between append() and extend() functions of list.
What is the difference between del keyword and clear() function?
How to remove list elements lets say starting from 2 to 5th element
If I say x=1,2,3 what is the data type of x?
How can I remove 3rd element from the tuuple?
How do you find largest number in a tuple containg numbers?
Which function is used to remove all elements of a dictionary?
Keys of a dictionary van be mutable or immuable ?
Can a key be repeated in a dictionary?
List can be used as key in a dictionary?
Tuples can be used as key in a dictionary?
Dictionary is mutable or immutable?
How can we create an empty dictionary?
Which function is used to return a value for a given key ?
Which function is used to remove all items from a dictionary?
I want to print only keys of a dictionary?
I want to print both keys and values of a dictionary ?
What are formal and actual parameters in a function?
Why do we use math module?
Give me two examples of byuilt in functions?
Which module is required for len()
Which numbers are given by range(10)
Cana function return more than one value?
What are positional arguments in a function?
What are keyword arguments in a function?
Whats the advantage of default arguments in a function?
Whats the difference bettween local and global variables ina function?
Why do we craete user defined functions in Python?
How many times a function can be called in a program?
if we don’t write a return statement in a function, what value is returned by it?
What is LEGB rule wrt functions?
Tell me a command to generate a random number between 1 to 10
int, float- is mutable or immutable?
Which module is required to use sin() function?
Which module is required to use random() function?
Whats the difference between text files and binary files?
What happens to the previous data if I open the file in 'w' mode
Whats the difference between 'a' and 'w' mode in file handling?
If I want to read first 10 characters from a text file, what statement will I give?
To read entire text file in one go, what statement is given?
Whats the difference between readlines() and read()
f.readline()
Which function is used to read all characters in the file?
Which function is used to write data in text file?
Which function is used to write data inbinary file?
Which function is used to read data from a binary file?
Which module is required to read/write data from binary files.
Whats the difference between r+ and w+ modes?
How do we open a binary file in read only mode?
Select count( * ) from student; return 5 and Select count(fee) from student; return 4
why different output is coming in above two queries?
1. DDL
2. DDL
3. DML
4. DML
5. DDL
6. DML
7. DML
FALSE
Null means a value which is unavailable or in other words we can say Null means no value.
Select name from student where name IS NOT NULL;
Select * from student where name IS NULL;
Drop table
Different output shows that there must be one null value in column fee.
Count(*) counts null also.
Alter command is used to change the structure of table and Update
command is used to modify the data of table.
Drop command delete the data as well as structure of table permanently
from database while delete command delete only the data from the table.
1 Fundametals
Is Python case sensitive?
How do you write comments in python?
https://csiplearninghub.com/python-viva-questions-class-12/