Skip to main content

What Is Variables In Python - tips4cse

 Variables In Python : 



Variables :

We use variables to temporarily store data in computer’s memory.

price = 1.0

rating = 4.9

course_name = ‘Python for Beginners’

is_published = True

In the above example,

price is an integer (a whole number without a decimal point)

rating is a float (a number with a decimal point)

course_name is a string (a sequence of characters)

is_published is a boolean. Boolean values can be True or False.

Comments

Popular posts from this blog

How to Install PyCharm? (Windows, Mac, Ubuntu)

  A little introduction PyCharm is one of the widely used IDE for python programming and used by many programmers these days. It is available in three editions: Professional, Community and Educational (Edu). We will prefer Edu edition as it is an open source and free to use. Also, it fits our purpose of learning python as a beginner. If you have already installed pycharm or some other compiler you can skip this and read the tutotrial here>>  Let's Get Started with Python Install PyCharm You can go to the official page and follow the guide to installation, to go to the official page  click here  or stick with me and follow the steps below. This is the direct link to install PyCharm Edu>>  click here Already Installed PyCharm Community or Professional? Then you just need to install EduTools Plugin. To install the plugin follow these simple steps: 1.         Go to Files>>Settings... or Press Ctrl+Alt+S to open Se...

How To Create Super User In Django

  1. Install Python 2. Open Command Prompt 3. Type pip install Django 4. Go to your new folder directory 5. Open powershell or CMD 6. Run django-admin 7. Run django-admin startproject projectname 8. And Its Done Creating an admin user ¶ First we’ll need to create a user who can login to the admin site. Run the following command: $ python manage.py createsuperuser Enter your desired username and press enter. Username: admin You will then be prompted for your desired email address: Email address: admin@example.com The final step is to enter your password. You will be asked to enter your password twice, the second time as a confirmation of the first. Password: ********** Password (again): ********* Superuser created successfully. Start the development server ¶ The Django admin site is activated by default. Let’s start the development server and explore it. Recall from Tutorial 1 that you start the development server like so: $ python manage.py runserver Now, open a Web browser and...