SlideShare a Scribd company logo
Variable, Constant, Operators
   and Control Statement
Variables
• Programming element used to store a
  value in the program while the program
  is running.
• It is a name area in the memory which
  holds temporary data.
                EXAMPLE:
                Name = “Shaira”
                Age = text1.text
• EXPLICIT DECLARATION – declaring variable by
  typing DIM (dimension) statement and a
  variable name.
Syntax: Dim Variable Name As Data type
        Example:
        Dim LastName As String
• IMPLICIT DECLARATION – declaring a variable
  without the Dim Statement; simply use the
  variable on its own.
       Example:
       LastName=“Fernandez”
Constant
• Meaningful Name that takes place of a
  number or a string that does not change.
• Values that do not change during the
  execution of the program.
Syntax: Const Constant Name As data type =
  value
     Example:
     const Pi As Single = 3.142
     Score= 100
Operators
• Operators are symbols that indicates
  operation to be performed on data.
There are 3 types of Operators
1. Arithmetic Operators
2. Relational Operators
3. Conditional Operators
Arithmetic Operators- Mathematical
 Operators that is used to compute
 inputs from users to generate results.
Relational Operators – Operators that is
 used to compare two values basing on
 a certain conditions yields a TRUE or
 FALSE result.
Logical Operators – Operators that
 determine if a particular condition is
 met.
                                     NEXT
Operators           Description                Example       Result
   +        Add                                  5+5          10
    -       Substract                            10-5          5
    /       Divide                               25/5          5

           Integer Division                     203          6
            (disregards the decimal places)

   *        Multiply                             5*4          20

   ^        Exponent (power of)                  3^3          27

  Mod       Remainder of division              20 Mod 6        2

                                              "George"&"
   &        String concatenation                         "George Bush"
                                               "&"Bush"
Operators Description    Example   Result

   >      Greater than    10>8     True

   <       Less than      10<8     False
          Greater than
   >=                    20>=10    True
           or equal to
          Less than or
   <=                    10<=20    True
            equal to
   <>     Not Equal to    5<>4     True
   =        Equal to      5=7      False
Operators                  Description

            Operation will be true if either of the
   OR
            operands is true
            Operation will be true only if both the
  AND
            operands are true
            One sides or other must be true but
  XOR
            not both sides

  NOT       Negate truth
Condition of AND Operator
CONDITION 1     CONDITION2         RESULT
  TRUE             TRUE
  TRUE             FALSE
  FALSE            TRUE
  FALSE            FALSE
•If there’s a FALSE the result is false.
Condition of OR Operators
CONDITION 1     CONDITION2        RESULT
  TRUE            TRUE
  TRUE            FALSE
  FALSE           TRUE
  FALSE           FALSE
•If there’s a TRUE the result is true.
Condition of XOR Operator
CONDITION 1     CONDITION2         RESULT
  TRUE             TRUE
  TRUE             FALSE
  FALSE            TRUE
  FALSE            FALSE
•One sides or other must be true but not both
sides
Condition of NOT Operator

 CONDITION       RESULT
  TRUE
  FALSE

• Negate truth
Get a ¼ sheet of Paper
          Find the result

1. 9+7+8         6. 10>1
2. 8^3           7. .05>.5
3. 65/13         8. 1500>=150100
4. 95 mod 955    9.0>=0.00
5. (-5)+(-4)     10.5<>10
Find the result

1. 10*10<100 And 12<>12
2. 500=500.0 Or 95-15<85
3.True And False
4.Not False
5.1000/100>77 And 96<>95
ANSWER KEY

• 1. 24    •6. TRUE     • 1. FALSE
• 2. 512   •7. FALSE    • 2. TRUE
• 3. 5     •8. FALSE    • 3. FALSE
• 4. 5     •9. TRUE     • 4. TRUE
           •10. TRUE    • 5. FALSE
• 5. -9
CONDITIONAL STATEMENT
Conditional Statement
• It is one of the vital components
  in programming. It enables a
  program to respond in different
  manner every time a program is
  executed depending on the data
  entered.
Most Commonly Used Conditional
 Statement.
1. If.. Then Statement
2. If.. Then.. Else Statement
3. If.. Then.. ElseIf Statement
4. Select Case Statement
If.. Then Statement
• The If...Then statement examines the
  truthfulness of an expression. It allows
  your Program to make a decision based
  on the certain condition.
• SYNTAX:
              If condition then
                 Statement/s
                    End If
If.. Then.. Else Statement
• The If...Then statement offers only
  one alternative: to act if the
  condition is true. Whenever you
  would like to apply an alternate
  expression in case the condition is
  false, you can use the
  If...Then...Else statement.
If.. Then.. Else Statement
SYNTAX:
If Condition Then   If Score = 100 Then
   Statement1           Label1.caption =“Perfect”
                    Else
Else                     Label1.caption =“with
                    Mistakes”
   Statement2
                    End If
End If
If...Then...ElseIf Statement
SYNTAX:
                          The If...Then...ElseIf
If Condition1 Then
                           statement acts like
   Statement1
                          the If...Then...Else
ElseIf Condition2 Then
                          expression, except
   Statement2
                          that it offers as
ElseIf Condition 3 Then
                          many choices as
   Statement 3
                          necessary.
End If
SELECT CASE STATEMENT
• If you have a large number of
  conditions to examine,
  the If...Then...Else will go through
  each one of them. Visual Basic offers
  the alternative of jumping to the
  statement that applies to the state of
  the condition.
Syntax
Select Case Expression
Case Expression1     Select Case Subject

  Statement1         Case “Mathematics”
Case Expression2     lblsubject.caption=“Mathematics”
  Statement2
                     Case “Science”
Case Expression3          lblsubject.caption=“Science”
  Statement3
                     Case “English”
End Select                lblsubject.caption=“English”

                        End Select
LOOP Structure

• A loop is an expression used to
  repeat an action. Visual Basic
  presents many variations of the
  loops and they combine
  the Do and the Loop keywords.
Do...While Loop
• Used to execute a block of statements in
  an unspecified number of times while a
  condition is false on the first pass. The
  statement is not executed.
Syntax:               Dim Number As Integer
                      Number = 10
Do while conditions
                      Do While Number <20
  Statement/s             Number=Number+2
loop                      Print Number
                     Loop
Do...Loop...While Statement
Reverse formula of
the do while         Dim Number As Integer
statement.           Number = 10
Syntax:              Do
Do                       Number=Number+2
Statement(s)             Print Number
Loop While           Loop While Number <20
Condition
Do...Until...Loop Statement
• This loop will first examine the Condition,
  instead of examining whether the Condition is
  true, it will test whether the Condition is false.
Syntax:                 Example:
Do Until Condition Dim Number As Integer
    Statement(s)              Number=30
  Loop                  Do Until Number <=20
                              Number= Number-2
                        Print Number
                        Loop
Do...Loop...Until Statement
• An alternative to the Do...Until...loop consists
  of executing the Statement first.
                Example:
 Syntax:        Dim Number As Integer
 Do                   Number=30
   Statement(s) Do
 Loop Until           Number= Number-2
 Condition      Print Number
                Loop Until Number <=20
Get a ¼ Sheet of Paper
Identify the following.
1. Name area which holds temporary data.
2. Operators that is used to compare two
   values basing on a certain conditions.
3. An expression used to repeat an action.
4. Values that do not change during the
   execution of the program.
5. symbols that indicates operation to be
   performed on data.
6. Declaring a variable without the Dim
  Statement.
7. A Data type that stores a value of True or
  False
8. Operators that determine if a particular
  condition is met.
9. Type of data that consists of numbers which
  can be manipulated with various standard
  operators.
10. Declaring variable by typing DIM
  (dimension) statement and a variable name.
Identify whether a variable is valid or
invalid
1. Name 1
2. (The_variable)
3. My_First_Name
4. He&his_Father
5.Long_Name_Can_beuse
ANSWER KEY
1. Variable
2. Relational Operator
                           1.Invalid
3. Loop                    2.Invalid
4. Constant
5. Operators
                           3.Valid
6. Implicit declaration    4.Invalid
7. Boolean
8. Conditional operator
                           5.Valid
9. Numerical data type
10. Explicit declaration

More Related Content

What's hot

friend function(c++)
friend function(c++)friend function(c++)
friend function(c++)
Ritika Sharma
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
Ankit92Chitnavis
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
BG Java EE Course
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
Md.Al-imran Roton
 
Introduction to c++ ppt 1
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1
Prof. Dr. K. Adisesha
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
GirdharRatne
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVAAbhilash Nair
 
Packages in java
Packages in javaPackages in java
Packages in java
Elizabeth alexander
 
User defined functions in C
User defined functions in CUser defined functions in C
User defined functions in C
Harendra Singh
 
Control Structures
Control StructuresControl Structures
Control StructuresGhaffar Khan
 
concept of oops
concept of oopsconcept of oops
concept of oops
prince sharma
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
RubaNagarajan
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
MUKALU STEVEN
 
Algorithm
AlgorithmAlgorithm
Algorithm
IHTISHAM UL HAQ
 
itft-Decision making and branching in java
itft-Decision making and branching in javaitft-Decision making and branching in java
itft-Decision making and branching in java
Atul Sehdev
 
Functional dependancy
Functional dependancyFunctional dependancy
Functional dependancy
Visakh V
 
File handling in c
File handling in cFile handling in c
File handling in c
aakanksha s
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
Samuel Igbanogu
 

What's hot (20)

friend function(c++)
friend function(c++)friend function(c++)
friend function(c++)
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
 
Introduction to c++ ppt 1
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
 
Packages in java
Packages in javaPackages in java
Packages in java
 
User defined functions in C
User defined functions in CUser defined functions in C
User defined functions in C
 
Control Structures
Control StructuresControl Structures
Control Structures
 
concept of oops
concept of oopsconcept of oops
concept of oops
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
Break and continue
Break and continueBreak and continue
Break and continue
 
Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
itft-Decision making and branching in java
itft-Decision making and branching in javaitft-Decision making and branching in java
itft-Decision making and branching in java
 
Functional dependancy
Functional dependancyFunctional dependancy
Functional dependancy
 
File handling in c
File handling in cFile handling in c
File handling in c
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 

Viewers also liked

constants, variables and datatypes in C
constants, variables and datatypes in Cconstants, variables and datatypes in C
constants, variables and datatypes in CSahithi Naraparaju
 
Chapter1 c programming data types, variables and constants
Chapter1 c programming   data types, variables and constantsChapter1 c programming   data types, variables and constants
Chapter1 c programming data types, variables and constantsvinay arora
 
Vb.net (loop structure)
Vb.net (loop structure)Vb.net (loop structure)
Vb.net (loop structure)
Abhishek Pachisia
 
Control Structures in Visual Basic
Control Structures in  Visual BasicControl Structures in  Visual Basic
Control Structures in Visual BasicTushar Jain
 
Scientific method ppt
Scientific method pptScientific method ppt
Scientific method pptMaria Donohue
 
Introduction to turbo c
Introduction to turbo cIntroduction to turbo c
Introduction to turbo c
Hanielle Cheng
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0Aarti P
 
Vb decision making statements
Vb decision making statementsVb decision making statements
Vb decision making statements
pragya ratan
 
Introduction to algebra
Introduction to algebraIntroduction to algebra
Introduction to algebraArvin Caya
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)pbarasia
 
Control statements
Control statementsControl statements
Control statements
Kanwalpreet Kaur
 
Constants, Variables and Data Types in Java
Constants, Variables and Data Types in JavaConstants, Variables and Data Types in Java
Constants, Variables and Data Types in JavaAbhilash Nair
 
C language ppt
C language pptC language ppt
C language ppt
Ğäùråv Júñêjå
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programming
Manoj Tyagi
 

Viewers also liked (17)

constants, variables and datatypes in C
constants, variables and datatypes in Cconstants, variables and datatypes in C
constants, variables and datatypes in C
 
Chapter1 c programming data types, variables and constants
Chapter1 c programming   data types, variables and constantsChapter1 c programming   data types, variables and constants
Chapter1 c programming data types, variables and constants
 
Vb.net (loop structure)
Vb.net (loop structure)Vb.net (loop structure)
Vb.net (loop structure)
 
Control Structures in Visual Basic
Control Structures in  Visual BasicControl Structures in  Visual Basic
Control Structures in Visual Basic
 
Scientific method ppt
Scientific method pptScientific method ppt
Scientific method ppt
 
Introduction to turbo c
Introduction to turbo cIntroduction to turbo c
Introduction to turbo c
 
Turbo c++
Turbo c++Turbo c++
Turbo c++
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
Vb decision making statements
Vb decision making statementsVb decision making statements
Vb decision making statements
 
Microsoft visual basic 6
Microsoft visual basic 6Microsoft visual basic 6
Microsoft visual basic 6
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Introduction to algebra
Introduction to algebraIntroduction to algebra
Introduction to algebra
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
Control statements
Control statementsControl statements
Control statements
 
Constants, Variables and Data Types in Java
Constants, Variables and Data Types in JavaConstants, Variables and Data Types in Java
Constants, Variables and Data Types in Java
 
C language ppt
C language pptC language ppt
C language ppt
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programming
 

Similar to Variable, constant, operators and control statement

Introducing Swift v2.1
Introducing Swift v2.1Introducing Swift v2.1
Introducing Swift v2.1
Abhishek Dwivedi
 
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdfBasic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
Computer Programmer
 
CIS 1403 lab 4 selection
CIS 1403 lab 4 selectionCIS 1403 lab 4 selection
CIS 1403 lab 4 selection
Hamad Odhabi
 
Ch5 Selection Statements
Ch5 Selection StatementsCh5 Selection Statements
Ch5 Selection Statements
SzeChingChen
 
Loops and conditional statements
Loops and conditional statementsLoops and conditional statements
Loops and conditional statements
Saad Sheikh
 
selection.ppt
selection.pptselection.ppt
selection.ppt
alaguap
 
ch1. .ppt
ch1. .pptch1. .ppt
ch1. .ppt
mazber1
 
Operators in java
Operators in javaOperators in java
Operators in java
Madishetty Prathibha
 
Cs1123 4 variables_constants
Cs1123 4 variables_constantsCs1123 4 variables_constants
Cs1123 4 variables_constantsTAlha MAlik
 
Lecture 05.pptx
Lecture 05.pptxLecture 05.pptx
Lecture 05.pptx
Mohammad Hassan
 
Vba Class Level 1
Vba Class Level 1Vba Class Level 1
Vba Class Level 1
Ben Miu CIM® FCSI A+
 
Vb.Net 01 To 03 Summary Upload
Vb.Net 01 To 03 Summary UploadVb.Net 01 To 03 Summary Upload
Vb.Net 01 To 03 Summary Upload
Hock Leng PUAH
 
Lecture 01 - Introduction and Review.ppt
Lecture 01 - Introduction and Review.pptLecture 01 - Introduction and Review.ppt
Lecture 01 - Introduction and Review.ppt
MaiGaafar
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
Neeru Mittal
 
Python-review1.pdf
Python-review1.pdfPython-review1.pdf
Python-review1.pdf
paijitk
 
Python-review1.ppt
Python-review1.pptPython-review1.ppt
Python-review1.ppt
snowflakebatch
 

Similar to Variable, constant, operators and control statement (20)

Introducing Swift v2.1
Introducing Swift v2.1Introducing Swift v2.1
Introducing Swift v2.1
 
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdfBasic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
Basic_C++ Notes with problema from Preethi arora and suneetha arora.pdf
 
CIS 1403 lab 4 selection
CIS 1403 lab 4 selectionCIS 1403 lab 4 selection
CIS 1403 lab 4 selection
 
Ch5 Selection Statements
Ch5 Selection StatementsCh5 Selection Statements
Ch5 Selection Statements
 
Loops and conditional statements
Loops and conditional statementsLoops and conditional statements
Loops and conditional statements
 
LOOPS AND DECISIONS
LOOPS AND DECISIONSLOOPS AND DECISIONS
LOOPS AND DECISIONS
 
selection.ppt
selection.pptselection.ppt
selection.ppt
 
ch1. .ppt
ch1. .pptch1. .ppt
ch1. .ppt
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Java script session 4
Java script session 4Java script session 4
Java script session 4
 
Cs1123 4 variables_constants
Cs1123 4 variables_constantsCs1123 4 variables_constants
Cs1123 4 variables_constants
 
Lecture 05.pptx
Lecture 05.pptxLecture 05.pptx
Lecture 05.pptx
 
Vba Class Level 1
Vba Class Level 1Vba Class Level 1
Vba Class Level 1
 
Vb.Net 01 To 03 Summary Upload
Vb.Net 01 To 03 Summary UploadVb.Net 01 To 03 Summary Upload
Vb.Net 01 To 03 Summary Upload
 
MA3696 Lecture 7
MA3696 Lecture 7MA3696 Lecture 7
MA3696 Lecture 7
 
Lecture 01 - Introduction and Review.ppt
Lecture 01 - Introduction and Review.pptLecture 01 - Introduction and Review.ppt
Lecture 01 - Introduction and Review.ppt
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 
Python-review1.pdf
Python-review1.pdfPython-review1.pdf
Python-review1.pdf
 
Python-review1.ppt
Python-review1.pptPython-review1.ppt
Python-review1.ppt
 
How to Program
How to ProgramHow to Program
How to Program
 

More from Eyelean xilef

Concept of computer programming iv
Concept of computer programming ivConcept of computer programming iv
Concept of computer programming ivEyelean xilef
 
Database management system
Database management systemDatabase management system
Database management systemEyelean xilef
 
Variable, constant, operators and control statement
Variable, constant, operators and control statementVariable, constant, operators and control statement
Variable, constant, operators and control statementEyelean xilef
 
The ms visual basic 6
The ms visual basic 6The ms visual basic 6
The ms visual basic 6Eyelean xilef
 
Computer laboratory rules
Computer laboratory rulesComputer laboratory rules
Computer laboratory rulesEyelean xilef
 
The product of interconnectivity
The product of interconnectivityThe product of interconnectivity
The product of interconnectivityEyelean xilef
 

More from Eyelean xilef (12)

The number system
The number systemThe number system
The number system
 
Concept of computer programming iv
Concept of computer programming ivConcept of computer programming iv
Concept of computer programming iv
 
Stereotype
StereotypeStereotype
Stereotype
 
Gui
GuiGui
Gui
 
Poverty
PovertyPoverty
Poverty
 
Database management system
Database management systemDatabase management system
Database management system
 
Database
DatabaseDatabase
Database
 
Codes of ethics
Codes of ethicsCodes of ethics
Codes of ethics
 
Variable, constant, operators and control statement
Variable, constant, operators and control statementVariable, constant, operators and control statement
Variable, constant, operators and control statement
 
The ms visual basic 6
The ms visual basic 6The ms visual basic 6
The ms visual basic 6
 
Computer laboratory rules
Computer laboratory rulesComputer laboratory rules
Computer laboratory rules
 
The product of interconnectivity
The product of interconnectivityThe product of interconnectivity
The product of interconnectivity
 

Recently uploaded

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 

Recently uploaded (20)

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 

Variable, constant, operators and control statement

  • 1. Variable, Constant, Operators and Control Statement
  • 2. Variables • Programming element used to store a value in the program while the program is running. • It is a name area in the memory which holds temporary data. EXAMPLE: Name = “Shaira” Age = text1.text
  • 3. • EXPLICIT DECLARATION – declaring variable by typing DIM (dimension) statement and a variable name. Syntax: Dim Variable Name As Data type Example: Dim LastName As String • IMPLICIT DECLARATION – declaring a variable without the Dim Statement; simply use the variable on its own. Example: LastName=“Fernandez”
  • 4. Constant • Meaningful Name that takes place of a number or a string that does not change. • Values that do not change during the execution of the program. Syntax: Const Constant Name As data type = value Example: const Pi As Single = 3.142 Score= 100
  • 5. Operators • Operators are symbols that indicates operation to be performed on data. There are 3 types of Operators 1. Arithmetic Operators 2. Relational Operators 3. Conditional Operators
  • 6. Arithmetic Operators- Mathematical Operators that is used to compute inputs from users to generate results. Relational Operators – Operators that is used to compare two values basing on a certain conditions yields a TRUE or FALSE result. Logical Operators – Operators that determine if a particular condition is met. NEXT
  • 7. Operators Description Example Result + Add 5+5 10 - Substract 10-5 5 / Divide 25/5 5 Integer Division 203 6 (disregards the decimal places) * Multiply 5*4 20 ^ Exponent (power of) 3^3 27 Mod Remainder of division 20 Mod 6 2 "George"&" & String concatenation "George Bush" "&"Bush"
  • 8. Operators Description Example Result > Greater than 10>8 True < Less than 10<8 False Greater than >= 20>=10 True or equal to Less than or <= 10<=20 True equal to <> Not Equal to 5<>4 True = Equal to 5=7 False
  • 9. Operators Description Operation will be true if either of the OR operands is true Operation will be true only if both the AND operands are true One sides or other must be true but XOR not both sides NOT Negate truth
  • 10. Condition of AND Operator CONDITION 1 CONDITION2 RESULT TRUE TRUE TRUE FALSE FALSE TRUE FALSE FALSE •If there’s a FALSE the result is false.
  • 11. Condition of OR Operators CONDITION 1 CONDITION2 RESULT TRUE TRUE TRUE FALSE FALSE TRUE FALSE FALSE •If there’s a TRUE the result is true.
  • 12. Condition of XOR Operator CONDITION 1 CONDITION2 RESULT TRUE TRUE TRUE FALSE FALSE TRUE FALSE FALSE •One sides or other must be true but not both sides
  • 13. Condition of NOT Operator CONDITION RESULT TRUE FALSE • Negate truth
  • 14. Get a ¼ sheet of Paper Find the result 1. 9+7+8 6. 10>1 2. 8^3 7. .05>.5 3. 65/13 8. 1500>=150100 4. 95 mod 955 9.0>=0.00 5. (-5)+(-4) 10.5<>10
  • 15. Find the result 1. 10*10<100 And 12<>12 2. 500=500.0 Or 95-15<85 3.True And False 4.Not False 5.1000/100>77 And 96<>95
  • 16. ANSWER KEY • 1. 24 •6. TRUE • 1. FALSE • 2. 512 •7. FALSE • 2. TRUE • 3. 5 •8. FALSE • 3. FALSE • 4. 5 •9. TRUE • 4. TRUE •10. TRUE • 5. FALSE • 5. -9
  • 18. Conditional Statement • It is one of the vital components in programming. It enables a program to respond in different manner every time a program is executed depending on the data entered.
  • 19. Most Commonly Used Conditional Statement. 1. If.. Then Statement 2. If.. Then.. Else Statement 3. If.. Then.. ElseIf Statement 4. Select Case Statement
  • 20. If.. Then Statement • The If...Then statement examines the truthfulness of an expression. It allows your Program to make a decision based on the certain condition. • SYNTAX: If condition then Statement/s End If
  • 21. If.. Then.. Else Statement • The If...Then statement offers only one alternative: to act if the condition is true. Whenever you would like to apply an alternate expression in case the condition is false, you can use the If...Then...Else statement.
  • 22. If.. Then.. Else Statement SYNTAX: If Condition Then If Score = 100 Then Statement1 Label1.caption =“Perfect” Else Else Label1.caption =“with Mistakes” Statement2 End If End If
  • 23. If...Then...ElseIf Statement SYNTAX: The If...Then...ElseIf If Condition1 Then statement acts like Statement1 the If...Then...Else ElseIf Condition2 Then expression, except Statement2 that it offers as ElseIf Condition 3 Then many choices as Statement 3 necessary. End If
  • 24. SELECT CASE STATEMENT • If you have a large number of conditions to examine, the If...Then...Else will go through each one of them. Visual Basic offers the alternative of jumping to the statement that applies to the state of the condition.
  • 25. Syntax Select Case Expression Case Expression1 Select Case Subject Statement1 Case “Mathematics” Case Expression2 lblsubject.caption=“Mathematics” Statement2 Case “Science” Case Expression3 lblsubject.caption=“Science” Statement3 Case “English” End Select lblsubject.caption=“English” End Select
  • 26. LOOP Structure • A loop is an expression used to repeat an action. Visual Basic presents many variations of the loops and they combine the Do and the Loop keywords.
  • 27. Do...While Loop • Used to execute a block of statements in an unspecified number of times while a condition is false on the first pass. The statement is not executed. Syntax: Dim Number As Integer Number = 10 Do while conditions Do While Number <20 Statement/s Number=Number+2 loop Print Number Loop
  • 28. Do...Loop...While Statement Reverse formula of the do while Dim Number As Integer statement. Number = 10 Syntax: Do Do Number=Number+2 Statement(s) Print Number Loop While Loop While Number <20 Condition
  • 29. Do...Until...Loop Statement • This loop will first examine the Condition, instead of examining whether the Condition is true, it will test whether the Condition is false. Syntax: Example: Do Until Condition Dim Number As Integer Statement(s) Number=30 Loop Do Until Number <=20 Number= Number-2 Print Number Loop
  • 30. Do...Loop...Until Statement • An alternative to the Do...Until...loop consists of executing the Statement first. Example: Syntax: Dim Number As Integer Do Number=30 Statement(s) Do Loop Until Number= Number-2 Condition Print Number Loop Until Number <=20
  • 31. Get a ¼ Sheet of Paper Identify the following. 1. Name area which holds temporary data. 2. Operators that is used to compare two values basing on a certain conditions. 3. An expression used to repeat an action. 4. Values that do not change during the execution of the program. 5. symbols that indicates operation to be performed on data.
  • 32. 6. Declaring a variable without the Dim Statement. 7. A Data type that stores a value of True or False 8. Operators that determine if a particular condition is met. 9. Type of data that consists of numbers which can be manipulated with various standard operators. 10. Declaring variable by typing DIM (dimension) statement and a variable name.
  • 33. Identify whether a variable is valid or invalid 1. Name 1 2. (The_variable) 3. My_First_Name 4. He&his_Father 5.Long_Name_Can_beuse
  • 34. ANSWER KEY 1. Variable 2. Relational Operator 1.Invalid 3. Loop 2.Invalid 4. Constant 5. Operators 3.Valid 6. Implicit declaration 4.Invalid 7. Boolean 8. Conditional operator 5.Valid 9. Numerical data type 10. Explicit declaration