Variable Dan Type Pada Python

Home Forums Programming Variable Dan Type Pada Python

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Ali Akbar
    Moderator

      Variable Dan Type Pada python

      Number
      #Integer / Bilangan bulat
      int = 69
      print (int)

      Output:
      69

      #Float / Bilangan desimal
      tfloat = 6.0
      print(tfloat)
      tfloat = float(6)
      print(tfloat)

      Output:
      6.0
      6.0

      #Strings / Menampilakn huruf(karakter)
      tstring = ‘Tegal1337 In Here’
      print(tstring)

      Output:
      Tegal1337 In Here

      #Manggabungkan variable
      one = 1
      two = 2
      three = one + two
      print(three)

      tg = “Tegal”
      dev = “Developer”
      add = tg + ” ” + dev
      print(add)

      Output:
      3
      Tegal Developer

      #Assignments Variable / Dijalankan Bersamaan
      a, b = 6, 9
      print(a,b)

      Output:
      6 9

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.

    We are all close together

    A problem, a bug, a question, an emergency?
    Do not hesitate to visit the help centre, we can help you.

    Copyright © 2021 Tegal1337. All rights reserved