TN Online TestSamacheer Kalvi practice

Importing C++ programs in Python - Formula Sheet

Share this chapter: Telegram

Key Syntaxes and Module Formulas

C++ Script Execution Command:

python filename.py -i cpp_filename

Module Function Access Formula:

module_name.function_name()

C++ Compilation Command Formula:

os.system('g++ ' + inp_file + ' -o ' + exe_file)

Command-Line Argument Parsing Formula:

opts, args = getopt.getopt(argv, options, [long_options])

Main Script Execution Conditional block:

if __name__ == '__main__': main(sys.argv[1:])

Solved MCQs → Practice test →

More for this chapter

Book Back Questions10 textbook MCQs · solved Additional MCQs15 extra MCQs · solved Practice TestInteractive · instant score Book Back TestTest yourself on the textbook set Additional MCQ TestTest yourself on the extra set Study NotesConcepts & methods

More chapters in Computer Science

View all
1 Function 2 Data Abstraction 3 Scoping 4 Algorithmic Strategies 5 Python -Variables and Operators 6 Control Structures 7 Python functions 8 Strings and String manipulation 9 Lists, Tuples, Sets and Dictionary 10 Python Classes and objects 11 Database Concepts 12 Structured Query Language (SQL) 13 Python and CSV files 15 Data manipulation through SQL 16 Data visualization using pyplot: line chart, pie chart and bar chart