Please select a subject first
Advertisements
Advertisements
How did a Trojan get its name?
Concept: undefined >> undefined
How does adware generate revenue for its creator?
Concept: undefined >> undefined
Advertisements
How is a Virtual Keyboard safer than an On-Screen Keyboard?
Concept: undefined >> undefined
List and briefly explain different modes of malware distribution.
Concept: undefined >> undefined
List some common signs of malware infection.
Concept: undefined >> undefined
List some preventive measures against malware infection.
Concept: undefined >> undefined
What are the main components of data communication?
Concept: undefined >> undefined
Assertion (A): CSV (Comma Separated Values) is a file format for data storage that looks like a text file.
Reason (R): The information is organized with one record on each line and each field is separated by a comma.
Concept: undefined >> undefined
Atharva is a Python programmer working on a program to find and return the maximum value from the list. The code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
def max_num (L):
max=L(O)
for a in L:
if a > max
max=a
return maxConcept: undefined >> undefined
Differentiate between CHAR and VARCHAR data types in SQL with appropriate examples.
Concept: undefined >> undefined
Write one difference between CSV and text files.
Concept: undefined >> undefined
In a table in the MYSQL database, an attribute A of datatype varchar(20) has the value “Keshav”. The attribute B of datatype char(20) has the value “Meenakshi”. How many characters are occupied by attribute A and attribute B?
Concept: undefined >> undefined
The code given below accepts a number as an argument and returns the reverse number. Observe the following code carefully and rewrite it after removing all syntax and logical errors. Underline all the corrections made.
define revNumber (num) :
rev = 0
rem = 0
While num > 0:
rem ==num %10
rev = rev*10 + rem
num = num//10
return rev
print (revNumber (1234))Concept: undefined >> undefined
Kabir wants to write a program in Python to insert the following record in the table named Student in MYSQL database,
SCHOOL:
- rno(Roll number) - integer
- name(Name) - string
- DOB (Date of birth) - Date
- Fee - float
Note the following to establish connectivity between Python and MySQL:
- Username - root
- Password - tiger
- Host - localhost
The values of fields rno, name, DOB and fee has to be accepted from the user. Help Kabir to write the program in Python.
Concept: undefined >> undefined
Zack is working in a database named SPORT, in which he has created a table named “Sports” containing columns SportId, SportName, no_of_players, and category.
After creating the table, he realized that the attribute, category has to be deleted from the table and a new attribute TypeSport of data type string has to be added. This attribute TypeSport cannot be left blank. Help Zack write the commands to complete both the tasks.
Concept: undefined >> undefined
How are text files different from binary files?
Concept: undefined >> undefined
Sartaj has created a table named Student in MYSQL database, SCHOOL:
- rno(Roll number )- integer
- name(Name) - string
- DOB (Date of birth) – Date
- Fee – float
Note the following to establish connectivity between Python and MySQL:
- Username - root
- Password - tiger
- Host - localhost
Sartaj, now wants to display the records of students whose fee is more than 5000. Help Sartaj to write the program in Python.
Concept: undefined >> undefined
Consider the code given below and fill in the blanks.
print (" Learning Exceptions…")
try:
num1 = int(input ("Enter the first number")
num2 = int(input("Enter the second number"))
quotient=(num1/num2)
print ("Both the numbers entered were correct")
except ________: # to enter only integers
print (" Please enter only numbers")
except __________: # Denominator should not be zero
print(" Number 2 should not be zero")
else:
print(" Great .. you are a good programmer")
___________________ : # to be executed at the end
print(" JOB OVER… GO GET SOME REST")Concept: undefined >> undefined
Write the use and syntax for the following method:
open()
Concept: undefined >> undefined
Write a command(s) to write the following lines to the text file named hello.txt. Assume that the file is opened in append mode.
“ Welcome my class”
“It is a fun place”
“You will learn and play”
Concept: undefined >> undefined
