12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications рооро┐ройрпНройрогрпБ родро░ро╡рпБ рокро░ро┐рооро╛ро▒рпНро▒роорпН Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications рооро┐ройрпН - ро╡рогро┐роХ рокро╛родрпБроХро╛рокрпНрокрпБ роЕроорпИрокрпНрокрпБроХро│рпН Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications рооро┐ройрпНройрогрпБ роЪрпЖро▓рпБродрпНродро▓рпН роорпБро▒рпИроХро│рпН Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications рооро┐ройрпН - ро╡рогро┐роХроорпН Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications родро┐ро▒роирпНрод роорпВро▓ роХро░рпБродрпНродрпБро░рпБроХрпНроХро│рпН Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications ро╡ро▓рпИропроорпИрокрпНрокрпБ ро╡роЯрооро┐роЯро▓рпН Sample Question Papers Study Material - QB365 Set A

Published on: 13/09/2022
QB365 provides a detailed and simple solution for every Possible Creative Questions in Class 12 Computer Science Subject - Importing C++ Programs in Python , English Medium. It will help Students to get more practice questions, Students can Practice these question papers in addition to score best marks.
Download Tamil Nadu 12th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
Write a C++ program to implement multilevel inheritance.
2.
Write a C++ program to find a cube of a number using user defined function.
3.
Write a C++ program to print a Transpose of Matrix.
4.
Write the steps for executing C++ program.
5.
Write a C++ Program to check the given number is palindrome or not.
6.
Write short notes on Python program to import C++.
7.
Write short notes on python language.
8.
Write an algorithm for executing C++ program pali_cpp.cpp using python program.pall.py.
9.
How to import modules in python?
10.
List the commonly used python interfaces.
11.
Write a note on
(i) sys module
(ii) OS module
(iii) getopt module
1.
Program:
#include < iostream >
using namespace std;
// base class
class Vehicle
{
public:
Vehicle ( )
{
cout<< "This is a Vehicle"<< endl;
}
};
class three wheeler: public vehicle
{ public:
threewheeler ( )
{
cout <<"Objects with 3 wheels are vehicles"<< endl;
}
};
// sub class derived from two base classes
class Auto: public threewheeler{
public:
Auto ( )
{
cout<< "Auto has 3 Wheels"<< endl;
}
};
// main function
int main ( )
{
//creating object of subclass will invoke the constructor of base classes
Auto obj;
return 0;
}
2.
Program:
#include <iostream>
using namespace std;
// Function declaration
int cube(int num),
int main( )
{
int num;
int c;
cout<< "Enter any number: "<<endl;
cin >> num;
c = cube(num);
cout<< "Cube of" <<num << is <<c;
return 0;
}
\\Function to find cube of any number int cube (int num)
int cube(int num)
{
return (num * num * num);
}
3.
Program:
#include <iostream>
using namespace std;
int main ( )
{
int a [3] [3], i, j;
for(i=0; i< 3; i++)
{
for(j=0; j< 3; j++)
{cout<< "enter the value for array["<< i+ 1<< "]"<< "["<< j+ 1<< "]:";
cin >> a[i][j];
}
}
system ("cIs");
cout<< "\n\nOriginal Array\n";
for(i=0; i< 3; i++) {
for(j=0; j< 3; j++ )
cout<< a[i] [j]<<' ';
cout<< endl; }
cout<< "\n\n The Transpose of Matrix \n";
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
cout<< a [j] [i]<< ' ';
cout<< endl;
}
return 0;
}
4.
The steps for executing the C++ program to check a given number is palindrome or not is given:
Step 1: Type the C++ program to check whether the input number is palindrome or not in notepad and save it as "pali_cpp.cpp".
Step 2: Type the Python program and save it as pali.py.
step 3: Click the Run Terminal and open the command window.
Step 4: Go to the folder of Python using cd command.
Step 5: Type the command Python pali.py -i pali_cpp.
5.
Program:
#include <iostream>
using namespace std;
intmain ( )
{
int n, num, digit, rev = 0;
cout << "Enter a positive number: ";
cin >> num;
n = num;
while(num)
{digit = num % 10;
rev = (rev * 10) + digit;
num = num / 10; }
cout<< "The reverse of the number is:" <<rev <<endl;
Cout<<"The number is a palindrome";
else
cout<<"The number is not a palindrome ";
return 0;
}
6.
Python contains many modules. For a problem Python allows programmers to have the flexibility in using different modules at their convenience. The Python program that we have written contains a few new commands which we have not come across in the basic Python program. Since our program is an integration of two different languages, we have to import the modules like os, sys, and getopt.
7.
Python is actually an interpreter, high-level, general-purpose programming language that can be used on any modern computer operating System. It can be used for processing text, numbers, images, and scientific data, and just about anything else we might save on a computer. Nowadays, large applications are written almost exclusively in Python.
8.
Step 1: Type the C++ program to check whether the input number is palindrome or not in notepad and save it as "pali_cpp.cpp".
Step 2: Type the Python program and save it as pali.py.
Step 3: Click the Run Terminal and open the command window
Step 4: Go to the folder of Python using cd command
Step 5: Type the command Python pali.py -i pali_cpp
9.
(i) We can import the definitions inside a module to another module. We use the import keyword to do this.
(ii) Using the module name we can access the functions defined inside the module. The dot (.) operator is used to access the functions. The syntax for accessing the functions from the module is
<module name>. <function name>
(iii) Example: >>> factorial.fact(5)
10.
The commonly used interfaces are
(i) Python-C-API (API-Application Programming Interface for interfacing with C programs)
(ii) Ctypes (for interfacing with c programs)
(iii) SWIG (Simplified Wrapper Interface Generator- Both C and C++)
(iv) Cython (Cython is both a Python-like language for writing C-extensions)
(v) Boost. Python (a framework for interfacing Python and c++)
(vi) MinGW (Minimalist GNU for Windows)
11.
(i) sys module provides access to some variables used by the interpreter and to functions that interact with the interpreter
(ii) OS module in Python provides a way of using operating system dependent functionality
(iii) The getopt module of Python helps you to parse (split) command-line options and arguments.
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications роХро│рокрпНрокрпЖропро░рпН роорпБро▒рпИроорпИ (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications ро╡ро▓рпИропроорпИрокрпНрокрпБ роОроЯрпБродрпНродрпБроХрпНроХро╛роЯрпНроЯрпБроХро│рпН рооро▒рпНро▒рпБроорпН роирпЖро▒ро┐роорпБро▒рпИроХро│рпН Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications роХрогро┐ройро┐ ро╡ро▓рпИропроорпИрокрпНрокрпБ роУро░рпН роЕро▒ро┐роорпБроХроорпН Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-роЙроЯройрпН MySQL-роР роЗрогрпИродрпНродро▓рпН Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards