Basic Concepts of Programming ?

Variable

variable is a value that can change, depending on conditions or on information passed to the program. Typically, a program consists of instruction s that tell the computer what to do and data that the program uses when it is running.

int roll = 10; // roll is a variable

Programming language

Python code :-


Java code :-

C++ code :-

C code:-

What is ConditionalStatements ?

A conditional statement is a statement that can be written in the form “If P then Q,” where P and Q are sentences.these are expressions that ask the program to determine if a variable is true or false.

There are two possible ways:

  • True –Action1
  • False –Action2

Programming language :-

Python code:-

Java code :-

C++ code :-

C code:-

Leave a Comment