Comparative Analysis of Python and Java for Beginners Mrs
Total Page:16
File Type:pdf, Size:1020Kb
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 08 | Aug 2020 www.irjet.net p-ISSN: 2395-0072 Comparative Analysis of Python and Java for Beginners Mrs. Selina Khoirom1, Moirangthem Sonia2, Borishphia Laikhuram3, Jaeson Laishram4, Tekcham Davidson Singh5 1Assistant Professor, Dept. of Computer Science & Engineering, Manipur Institute of Technology, Manipur-795004, India 2-5B.E. Student, Dept. of Computer Science & Engineering, Manipur Institute of Technology, Manipur-795004, India ---------------------------------------------------------------------***---------------------------------------------------------------------- Abstract - Coding and programming are all around us by Konrad Zuse for his Z1 computer between 1943 and and it will keep getting more widespread in the future. One 1945 although not implemented for the time being. The way to make a career in the field of IT is by learning to first functioning high-level programming language is program. Choosing a beginner-friendly programming known as the Short Code proposed by John Mauchly's in language is a very important and critical choice for a 1949 and was written in the early 1950s. Fortran beginner in the path of becoming a programmer. If a (Formula Translation) was the first commercially beginner is to choose a complex language when just starting available language developed by a team at IBM in the year in this field, then one could very easily lose interest in the of 1954. Programming and Coding are often used as field of programming. There are many programming interchangeable words, but we need to understand that languages that it becomes very confusing for a beginner to knowing how to code does not mean you can program. decide which language to start. This paper includes a Coding is the ability to write code with the knowledge of comparison of the two most popular, top-ranked, and in- the syntax and structure of a language while Programming demand programming languages Python and Java. A brief is the capability to transcribe an idea to solve a problem overview of Python and Java including its features, and it comprises coding, analyzing and implementing applications, advantages, and disadvantages is presented in algorithms, understanding data structures, and solving this work. The comparison of the two languages is based on problems. syntax and features comparison. The paper also includes the implementation of a simple quick sort algorithm and a There is a large scope for a Computer Science degree game called Tic-Tac-Toe in both the mentioned languages. holder and they can strive in any field. Nowadays, there The comparison result will also be focused on the ratio of are many programming languages available and each one lines of code (LOC), file capacity, and speed. We are to of them is better than the other in their own aspects. To conclude which programming will be much better for a choose only one programming language is tough. There beginner. are many different factors to be considered when choosing a language. Inaccuracy and misinformation of Key Words: Comparison, Python, Java, Programming characteristics of a programming language like third party Language, Beginner. support, ease of understanding, speed or function, etc., can have a huge impact when selecting a programming 1. INTRODUCTION language [5]. The idea that programming is an inborn trait is a myth. Novice thinks differently than an expert or professionals. When teaching how to read, we usually take shorter books What is easy and can be solved in a few seconds by a including simple, elementary words and not a classic professional can take a long time and be difficult for a novel. Similarly, we just need to apply the same in novice. Novice needs to know the syntax, variable, loops, programming also. Solving easy and simple problems how to iterate, etc., while professionals have already helps in building the confidence to solve complicated acquired the knowledge. Novice usually struggles on how problems [4]. Computational Thinking is essential to debug as they don’t usually know what should be especially for a person associated with Computer Science. happening. Some adverse circumstances that were even noticed at universities like Lappeenranta University of Technology (LUT) where learners of programming failed The argument to determine which programming language to pass the basic course and even if they do pass, they to be chosen by a novice has been an on-going controversy were atrocious. Novice usually notices that nearly all [10]. Programming Language is the terminology used to programming tools costly and decent Integrated communicate between machines and human beings. Development Environments (IDEs) perplexing. So, cheap Computers do not understand human language so we need yet high aspect tools should be chosen [4]. Novice needs to a language that machine usually understands. It gives use small tasks and tools suitable for their standard not instructions to the computer what to do next so as to for the level of a professional. perform a task or solve a problem. The first programming language officially proposed was Plankalkül, developed © 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4384 International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 08 | Aug 2020 www.irjet.net p-ISSN: 2395-0072 To a novice, it is burdensome and complicated to learn all opportunity for both languages is also very high. The the topics like object-oriented, dynamic memory handling, demand for developers with the knowledge of these etc., as they are not well equipped [4]. It is essential to languages keeps on increasing. But the demands are not execute an explicit and relevant scheme while learning a able to be fulfilled as they required skilled developers so programming language since the first programming the demand and supply chain is not linear. language leaves a lasting impression regarding the perception and ambition for learning programming [3]. The first part of the thesis focuses on the comparison of the Learner’s attention is divided if they are continuously syntax of the two languages and observe which one is less faced with the new programming environment. So, it is complicated and easy to comprehend. Finally, the necessary that they continue to master the environment QuickSort algorithm and a simple Tic-Tac-Toe game are they are familiar with [4]. implemented in the two mentioned languages. Similar fundamental building blocks are used by most of 2. LITERATURE REVIEW the programming language, so it will be easy and effortless to pick another new language if one has become proficient Monica, N., O. Ogbuokiri, Benedette, O. Okwume (2015), in a particular language [1]. Even-though programmers presented a report on “Comparison of python and java for use different languages, they usually incline to use the use in instruction in the first course in computer style and structure of their first language [6]. If programming” [1]. This thesis explains the comparison of appropriate steps are commenced computer programming programming languages (Python and Java) based on code is fun and easy. Thus, selecting a particular programming size, execution time, memory consumption, language is a crucial step faced by a beginner so as not to correctness/robustness, and commenting/reliability. The be perplexed and depreciate their confidence in job demands and salary for Java and Python developers programming. are emphasized in this paper. The algorithm for computation of increasing grade point average (CGPA) Among the various languages available, only Java and was enforced and implemented in both the language. The Python are chosen for this paper. Popularity of result of this experiment shows that Python consumes less Programming Language (PYPL) Git-hub index and the memory than Java, Python has a smaller code size than fourth Annual Developer Ecosystem Survey by JetBrains Java, Python implements faster than Java, and Java is more was used to get some ideas regarding the current robust than Python. So, Python is endorsed for instruction programming trends [14, 13]. Java is one of the most in- in the first course in computer programming class for the demand and popular languages and has been thriving for novice. around 25 years. Python is older than Java i.e., it has been around for 30 years. Python has been soaring in popularity E Insanudin (2019) conducted research on the for the past few years and able to challenge the popular comparison of source code implementation in Python and languages. This paper compares various characteristics Java [2]. The bubble sort algorithm is used in this paper to and features of both languages. analyze the comparison. The comparison is conducted based on lines of code, file capacity, and access speed. The 1.1 Objective same bubble sort algorithm is implemented in both the language i.e., Java and Python. The author concluded that The aspiration of this paper is to analyze and recommend python has a lesser number of codes and less file capacity which programming language will be better for a beginner than Java and access speed of Python is also good. such that they do not lose interest in the field of programming. This paper does not mean to affirm that the A Bogdanchikov, M Zhaparou, and R Suliyev (2013) programming languages mentioned in this paper surpasses presented a report on “Python to learn Programming” [3]. all the other programming language available and is the Python is used for this report as it has neatly organized best one for a beginner. Selecting a language that is syntax and powerful tools to solve any task. Python is easy beginner-friendly is very important for a beginner. and simple math. Some similar codes are implemented in Beginners usually do not have any knowledge of which Python, Java, and C++ and are analyzed. Python is easy to language to choose, so in this paper, we tried our best to read and understand so, it is favorable for beginners.