Variables-are-simply-a-representation-of-data-computer-science-homework-help

Variables-are-simply-a-representation-of-data-computer-science-homework-help

Respond to each post in 150 words

1 of 2

Variables are simply a representation of data. Variables can be either pre-written into a program or we assign whatever we want as a variable and decide what data will be represented. They are essentially data storage. Variables can represent any number of data including names, numbers (integers or floating), pictures, strings, sounds, etc. The way a variable works is once you assign a variable (x) to data (programming is fun) then you only need to type (x) in order to retrieve the string of data (programming is fun).

A constant is the opposite of a variable. A constant only has one value, it can not be changed or altered, can not be replaced. It remains the same always. Numbers are a good example of constants. An integer is always an integer, the value will never change. 2 will always be 2 and so on.

Variables are locations to store data. The data it stores varies depending on the programmer. All variables must have a name, type and size. In order for a variable to actually contain data, it needs a value assigned to it. This value is what data type is. An integer, character, string, etc. are all types of data. The importance of a data type is that it defines which functions can utilize the variables without causing errors.

In order to declare a variable you simply need to type what the variable name is then what data the variable will contain.

Variable: X

Data: Programming is fun

x=”programming is fun”

2 of 2

Variables and constants are both useful in the programming world. A variable can be either letters or numbers that are held in a container, usually within a string or list. Variables have the potential to change (or vary) over the course of your program dependent on conditions that are ingested into the program. For example, if I say gas = x (explaining that I have gas in my car that is always changing) I could have x = ¾ of a tank one day and depending on how far I drive I could have x = ½ of a tank the next. Constants on the other hand are essentially variables that cannot be changed. For example, if you have 6 jelly beans and neither gain nor lose any (despite they would probably become moldy over time) it is indisputably fair to say that you will always have 6 jelly beans. You could show this as jb = 6, where jb will not be changed throughout your program.

Variables can be used in many different data types in the Python language. They can be used in Boolean expressions where you have a true/false condition in the program sequence. They can also be used as integers or complex numbers, in a string or list, or even as a Python directory. These data types are essential in your Python program as they all complete different unique actions that can be used to work through different program requirements.

Luckily for us, Python does not require you to declare a variable. As Python is a dynamically typed language, you do not have to declare a variable and this allows for a more user-friendly programming experience. However, using a variable in Python would look like the following:

>>> gumballs = str(100)

>>> print (“There are” + “ “ + gumballs + “ “ + “gumballs!”)

This would print: There are 100 gumballs!

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational