INTRODUCTION
The main objective of this project is the line-by-line conversion of code written in C to Python syntax. This project can come in handy for a student learning the C-Programming Language with prior programming experience in Python. It will allow the student to easily draw parallels between the two syntaxes.
It can also be used in the industry for comparing the two syntaxes and their compilation properties.
Various functions have been defined in order to translate every part of a C program to Python. For example, the function, condition convert(), converts if - else if - else statements written in C to if – elif – else statements in Python.
2-Dimensional strings have been used to simplify iterations and nested iterations in the code.
The program is executed by reading from a text file that consists of the C code to be translated and the translated code is written to an output file.
Various functions have been defined in order to translate every part of a C program to Python. For example, the function, condition convert(), converts if - else if - else statements written in C to if – elif – else statements in Python.
2-Dimensional strings have been used to simplify iterations and nested iterations in the code.
The program is executed by reading from a text file that consists of the C code to be translated and the translated code is written to an output file.
Comments
Post a Comment