Day 01: Unveiling the Magic of INTRODUCTION in Java, C++, Python, and Kotlin!

nitinbhatt46

Nitin-bhatt46

Posted on March 4, 2024

Day 01: Unveiling the Magic of INTRODUCTION in Java, C++, Python, and Kotlin!

DAY - 01

Today’s Learning :-
Pseudocode :- Pseudocode is a way of expressing a computer algorithm using a mixture of natural language and some programming language conventions, but not adhering to the syntax of any particular programming language. It's a high-level description of the actions a program will take to solve a problem, focusing on logic rather than syntax.

Flowchart :- A flowchart is a graphical representation of a process or algorithm, using symbols connected by arrows to show the flow of steps. It's a visual tool that helps illustrate the sequence of steps, decisions, and actions involved in solving a problem or completing a task.

Transistors play a major role in computers.
1 bit = Binary
8 bit = 2 nibble
2 nibble = 1 byte

1024 bytes = 1 kb
1024 kb = 1 mb

Everything goes on power of 2.
Everything is stored in Transistor, but we have some common norm so that it will be the same all over the world. Here comes the Hero ASCII TABLE. It is a fixed value for all.

Compiler and Interpreter

Compiler:

Converts entire source code into machine code or bytecode before execution.

Produces standalone executable files that can be run independently.

Optimises code for better performance.

Commonly used in languages like C, C++, and Java.

Suitable for projects where performance is critical and code will be run multiple times.

Debugging can be more challenging due to the absence of line-by-line execution.

Interpreter:

Translates code line by line at runtime without producing a standalone executable.

Allows for easier debugging and prototyping.

Commonly used in scripting languages like Python and JavaScript.

Provides immediate feedback, making it suitable for small scripts and rapid development.

Portable across different platforms without the need for recompilation.

Generally slower than compiled code due to the interpretation overhead.

First code

Flow in c++
It only uses a compiler.

Flow in JAVA and Kotlin

It first converts code into bytecode with a compiler, bytecode is independent of the system it can be run anywhere. After that is interpreted to give output.

Flow in Python
If directly interpret the data and give the output.

Commenting is best for programmers which help them to write whatever they want without interfering with the code functioning.

// (Commenting in c++ , java, kotlin is // in python we use # )
First code
Basic code in c++

include // header file (library )

Int main(){ // code starting
using namespace std;
// cout is used to print output in screen.
cout<<”Hello World”;
}; // code ending

Basic code in JAVA

// class is a blueprint which is a basic need for java programming.
class abc{
// public means it can be accessed without any restriction and static means
// no instance is required to access it.
// void - return type with no returning value.
// main - it tell that program will start running from here.
public static void main(String[] args){
System.out.println(“Hello World”)
}
};

Basic code in Python

In python we can write code directly but indentation plays a major role.
print(“Hello World “ )

just printing

Basic code in Kotlin

In kotlin also we can write code directly but indentation plays a major role.

fun main(){

println("Hello World")
}

Only questions are written here; all the code snippets are present in GitHub.

Feel free to share this post to enhance awareness and understanding of these fundamental concepts in statistical analysis!

All the code snippets in this journey are available on my GitHub repository. 📂 Feel free to explore and collaborate:

🙏 Thank you all for your time and support! 🙏

Don't forget to catch me daily at 10:30 Am (Monday to Friday) for the latest updates on my programming journey! Let's continue to learn, grow, and inspire together! 💻✨

💖 💪 🙅 🚩
nitinbhatt46
Nitin-bhatt46

Posted on March 4, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related