Skip to main content

Comments in python?

If you know a little bit of programming language then You are use to with term "Comments" in programming..


In Python comments are separated by "#" hash symbol.

But when you want to use comments for multi lines this can be declared with ( ''' ) three Quotation marks.



Follow for further updates..

Dm me on Instagram and tell me how you guys want me to continue further.

Comments

Popular posts from this blog

How to create a login page in Tkinter [PYTHON] {VS CODE}

if You want to create a login page in tkinter here's the  tutorial   Insure that you have installed Tkinter Module VIDEO: Source code: from tkinter import * root = Tk() root.geometry( "700x455" ) def k():     Label(text= "Login UnSuccesful" ,font= "timesnewroman 12 bold" ).grid(row= 12 ,column= 3 ) i = Label(text= "User ID" ,font= "comicsansm 15 bold" ).grid(row= 2 ,column= 2 ) j = Label(text= "Password" ,font= "comicsansm 15 bold" ).grid(row= 3 ,column= 2 ) Label(text= "LOGIN SETUP" ,font= "callebri 13 bold" ,padx= 540 ).grid(row= 0 ,column= 3 ,columnspan= 9 ) user = Entry(textvariable=i).grid(row= 2 ,column= 3 ) passwd = Entry(textvariable=j).grid(row= 3 ,column= 3 ) Button(text= "SUBMIT" ,command=k,font= "helvatica 10 bold" ).grid(row = 6 , column= 3 ) root.mainloop()

How to create a calculator using Python

Python is a versatile and powerful programming language that can be used for many applications, including creating a calculator. In this blog post, we will learn how to create a simple calculator using Python that can perform basic arithmetic operations such as addition, subtraction, multiplication and division. To create a calculator using Python, we will need to use some built-in modules and functions. The modules we will use are: - sys: This module provides access to some system-specific parameters and functions, such as command-line arguments and exit status. - math: This module provides access to some mathematical functions and constants, such as pi and square root. - tkinter: This module provides a graphical user interface (GUI) toolkit for Python, which allows us to create windows, buttons, labels and other widgets. The functions we will use are: - eval: This function evaluates a string as a Python expression and returns the result. For example, eval("2+3") returns 5.