Skip to content

02 Basics

anjali0706 edited this page Aug 5, 2019 · 5 revisions

Define a variable and display at console

  • name = "Ram";
  • print("Hello Python")
  • print(name)

Define data types

  • a = 100 #integer

  • ids=101 # integer

  • price =99.99 #float

  • name = "Ram"; #string

  • print(a)

Type casting

  • print (x + y) #without type cast
  • print (int(x) + y) #after type cast

Clone this wiki locally