Posts

Showing posts with the label python

Digital clock using python tkinter

Image
Python is a general purpose and widely used high level programming language. It was created in 1991 by Guido van Rossum and developed by the Python Software Foundation. It is designed to emphasize the ability to read code and the sentence allows programmers to express their concepts in short lines. Python is a programming language that allows you to work faster and integrate systems more efficiently tkinter package  is the standard Python interface to the TK tool kit This is a simple clock made by using python and tkinter. source code : https://github.com/iamKaviB/pythonClock.git #python #tkinter #github #clock 

Python String (part II)

Image
 Hi there, Today we going to start part 2 of the python strings lesson, if you did not read part 1, here is the link  :String part I In part II, we going to discuss Slicing string, Modifying string, and String concatenation. okay, let's jump to the lesson. Slicing String what is slicing string? create a substring, that substring is essentially a string, that part of another string a =" my name is KaviB" a  is a string. b="KaviB" b is also a string as well as a substring of a. Slice in between the specific range get characters from index 2 to index 6 (index 6 is not included but index 2 is included) txt = "I am KaviB" print(txt[2:6]) Slice from the start txt = "I am KaviB" print(txt[:6]) Slice to the end txt = "I am KaviB" print(txt[2:]) Slice using negative indexing negative indexes use to start from the end. I am KaviB B=0 i=-1 v=-2 a=-3 so on... txt = "I am KaviB" print(txt[-7:-1]) Modify String Upper Case you can use th

Python String (part I)

Image
Strings What is strings ? A String is a type of data used in programming, such as a number and a floating point unit, but is used to represent text rather than numbers. ... For example, the word "kavib" and the phrase "I am kavib" are both strings . Even "373822" can be considered a string if specified correctly. In python, The string should be between single quotes or double-quotes. Strings can print using print() function print 'hello world' print "hello world" Assign to a Variable You can assign strings to a variable using the = operator.     a = 'hello world'     print(a) Multiline Strings In python, we can assign multiline strings using triple quotes. a="""hello world          hello country          hi there""" a='''hello world         hello country         hi there''' Looping via Strings In Python, you can loop, via characters in a string using for loop. for x in 'kav

Get ready

  Introduction to the Python language Python is a general purpose and widely used high level programming language. It was created in 1991 by Guido van Rossum and developed by the Python Software Foundation. It is designed to emphasize the ability to read code and the sentence allows programmers to express their concepts in short lines. Python is a programming language that allows you to work faster and integrate systems more efficiently. Python has many versions, latest version is  Python  3.9. 1 Before we start Python programming, we need a translator to interpret and run our programs. The Python code editor is designed to make coding and debugging easier for developers. By using these Python IDEs (Integrated Development Environments) you can manage a large code base and achieve rapid deployment. Here is a list of the best Python code editors with popular features and the latest download links. The list includes both open source (free) and premium tools. 1. pycharm 2 .kite 3. spyder D