Please select a subject first
Advertisements
Advertisements
Which of the following is a string used to terminate lines produced by the writer()method of the csv module?
Concept: undefined >> undefined
What is the output of the following program? import csv
d=csv.reader(open('c:\PYPRG\ch13\city.csv'))
next(d)
for row in d:
print(row)
if the file called “city.csv” contain the following details
| chennai,mylapore |
| mumbai,andheri |
Concept: undefined >> undefined
Advertisements
Making some changes in the data of the existing file or adding more data is called ______
Concept: undefined >> undefined
What will be written inside the file test.csv using the following program import csv
D = [['Exam'],['Quarterly'],['Halfyearly']]
csv.register_dialect('M',lineterminator = '\n')
with open('c:\pyprg\ch13\line2.csv', 'w') as f:
wr = csv.writer(f,dialect='M')
wr.writerows(D)
f.close()
Concept: undefined >> undefined
How will you sort more than one column from a CSV file? Give an example statement.
Concept: undefined >> undefined
Write a Python program to modify an existing file.
Concept: undefined >> undefined
Write a Python program to execute the following c++ coding.
#include<iostream>
using namespace std;
int main()
{ cout<<“WELCOME”;
return(0);
}
The above C++ program is saved in a file welcome. cpp.
Concept: undefined >> undefined
Which of the following function retrieves the average of a selected column of rows in a table?
Concept: undefined >> undefined
Which of the following refers to the visibility of variables in one part of a program to another part of the same program.
Concept: undefined >> undefined
Which scope refers to variables defined in current function?
Concept: undefined >> undefined
Why scope should be used for variable. State the reason.
Concept: undefined >> undefined
Identify the scope of the variables in the following pseudo-code and write its output
color:= Red
mycolor():
b:=Blue
myfavcolor():
g:=Green
printcolor, b, g
myfavcolor()
printcolor, b
mycolor()
print color
Concept: undefined >> undefined
What is meant by the scope of a variable? Mention its types.
Concept: undefined >> undefined
Write the rules of a local variable.
Concept: undefined >> undefined
Write the basic rules for a global keyword in python.
Concept: undefined >> undefined
What happens when we modify the global variable inside the function?
Concept: undefined >> undefined
Explain the scope of variables with an example.
Concept: undefined >> undefined
Which of the following is used as placeholders or replacement fields which get replaced along with format( ) function?
Concept: undefined >> undefined
