हिंदी

Commerce (English Medium) कक्षा १२ - CBSE Question Bank Solutions for Computer Science (Python)

Advertisements
[object Object]
[object Object]
विषयों
मुख्य विषय
अध्याय
Advertisements
Advertisements
Computer Science (Python)
< prev  41 to 60 of 219  next > 

List and briefly explain different modes of malware distribution.

[12] Security Aspects
Chapter: [12] Security Aspects
Concept: undefined >> undefined

List some common signs of malware infection.

[12] Security Aspects
Chapter: [12] Security Aspects
Concept: undefined >> undefined

Advertisements

List some preventive measures against malware infection.

[12] Security Aspects
Chapter: [12] Security Aspects
Concept: undefined >> undefined

What are the main components of data communication?

[11] Data Communication
Chapter: [11] 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.

[2] File Handling in Python
Chapter: [2] File Handling in Python
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 max
[1] Exception Handling in Python
Chapter: [1] Exception Handling in Python
Concept: undefined >> undefined

Differentiate between CHAR and VARCHAR data types in SQL with appropriate examples.

[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
Concept: undefined >> undefined

Write one difference between CSV and text files.

[2] File Handling in Python
Chapter: [2] File Handling in Python
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?

[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
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))
[1] Exception Handling in Python
Chapter: [1] Exception Handling in Python
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.

[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
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.

[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
Concept: undefined >> undefined

How are text files different from binary files?

[2] File Handling in Python
Chapter: [2] File Handling in Python
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.

[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
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")
[1] Exception Handling in Python
Chapter: [1] Exception Handling in Python
Concept: undefined >> undefined

Write the use and syntax for the following method:

open()

[2] File Handling in Python
Chapter: [2] File Handling in Python
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”

[2] File Handling in Python
Chapter: [2] File Handling in Python
Concept: undefined >> undefined

Write a Python program to open the file hello.txt used below in read mode to display its contents. What will be the difference if the file was opened in write mode instead of append mode?

“ Welcome my class”
“It is a fun place”
“You will learn and play”

[2] File Handling in Python
Chapter: [2] File Handling in Python
Concept: undefined >> undefined

Write a program to accept string/sentences from the user till the user enters “END” to. Save the data in a text file and then display only those sentences which begin with an uppercase alphabet.

[2] File Handling in Python
Chapter: [2] File Handling in Python
Concept: undefined >> undefined

All the branches of XYZ school conducted an aptitude test for all the students in the age group 14 - 16. There were a total of n students. The marks of n students are stored in a list. Write a program using a user defined function that accepts a list of marks as an argument and calculates the ‘xth’ percentile (where x is any number between 0 and 100).You are required to perform the following steps to be able to calculate the ‘xth’ percentile.

Note: Percentile is a measure of relative performance i.e. It is calculated based on a candidate’s performance with respect to others. For example: If a candidate's score is in the 90th percentile, that means she/he scored better than 90% of people who took the test.

Steps to calculate the xth percentile:

I. Order all the values in the data set from smallest to largest using Selection Sort. In general any of the sorting methods can be used.

II. Calculate index by multiplying x percent by the total number of values, n.
For example: to find 90th percentile for 120 students: 0.90*120 = 108

III. Ensure that the index is a whole number by using math.round()

IV. Display the value at the index obtained in Step 3.

The corresponding value in the list is the xth percentile.

[5] Sorting
Chapter: [5] Sorting
Concept: undefined >> undefined
< prev  41 to 60 of 219  next > 
Advertisements
Advertisements
CBSE Commerce (English Medium) कक्षा १२ Question Bank Solutions
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Accountancy
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Business Studies
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Computer Science (Python)
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Economics
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ English Core
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ English Elective - NCERT
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Entrepreneurship
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Geography
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Hindi (Core)
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Hindi (Elective)
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ History
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Informatics Practices
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Mathematics
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Physical Education
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Political Science
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Psychology
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Sanskrit (Core)
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Sanskrit (Elective)
Question Bank Solutions for CBSE Commerce (English Medium) कक्षा १२ Sociology
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×