What is Assignment: Definition and 358 Discussions

In computer programming, an assignment statement sets and/or re-sets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable. In most imperative programming languages, the assignment statement (or expression) is a fundamental construct.
Today, the most commonly used notation for this basic operation has come to be x = expr (originally Superplan 1949–51, popularized by Fortran 1957 and C) followed by x := expr (originally ALGOL 1958, popularised by Pascal), although there are many other notations in use. In some languages the symbol used is regarded as an operator (meaning that the assignment statement as a whole returns a value) while others define the assignment as a statement (meaning that it cannot be used in an expression).
Assignments typically allow a variable to hold different values at different times during its life-span and scope. However, some languages (primarily strictly functional) do not allow that kind of "destructive" reassignment, as it might imply changes of non-local state. The purpose is to enforce referential transparency, i.e. functions that do not depend on the state of some variable(s), but produce the same results for a given set of parametric inputs at any point in time. Modern programs in other languages also often use similar strategies, although less strict, and only in certain parts, in order to reduce complexity, normally in conjunction with complementing methodologies such as data structuring, structured programming and object orientation.

View More On Wikipedia.org
  1. A

    Multivariable Limits assignment

    I can't get this problem right and it's part of a web-based assignment that I have to submit. In order to get credit for the problem, all of my answers need to be right; I've tried many different times and I can't seem to figure out what I am doing wrong. Here it is with my explanations as to...
  2. H

    Odd Graph Algorithm assignment

    I've got a small assignment to do on graphs but it's a bit frustrating that no standard algoritms such as Dijkstra, Bellman-Ford, etc. can be used or at least I don't know how could they help. Given a graph one is to find shortest path through N points. That's it. Starting point can be...
  3. S

    Asking a prof for an assignment

    Asking a prof for an assignment! Hi, since the end of the semester is approaching,and i am planning on going home for the summer, so no summer classes, i was planning to work something on my own, like in some math topics. However, I was wondering whether it would be a better idea to ask one of...
  4. J

    How Does Tightening a Guitar String Affect Its Frequency?

    [SOLVED] Assignment Question Help! - Tuning Fork/ frequency I've talked to numerous people who can not figure out this question, so if anyone has any ideas on how to do this question please help me!:confused: A tuning fork is struck and held next to a vibrating guitar string, and beats of...
  5. J

    How Does Tightening a Guitar String Affect Beat Frequency?

    [SOLVED] Physics Assignment Question Help! I've talked to numerous people who can not figure out this question, so if anyone has any ideas on how to do this question please help me!:confused: A tuning fork is struck and held next to a vibrating guitar string, and beats of frequency 3 Hz...
  6. C

    Help with Drag Force/Terminal Velocity assignment

    Hi, I am a Senior in High school, looking for some help with a couple of questions that deal with both physics and mathematics. I was given a sheet with 4 scenarios on it, I chose a box falling from a height of 5 meters. The information is shown below: Object mass: 20 grams Dimensions of...
  7. P

    Energy Assignment: need a step in the right direction

    Homework Statement A 5.0g piece of iron at 75.0C is added to 150.0g of water at 15.0C. What is the final temperature of the iron and the water? (use c=0.444J/g*C for iron). Homework Equations Q = mc(T2-T1) The Attempt at a Solution In all honesty, I have no idea how to start this...
  8. M

    Help Needed: Solving a Physics Assignment with Marble and Ramp

    need urgent helllllp! im in year 12 at the moment and our new physics teacher has set us an assignment. it is very deceptively simple he informs us. it reads: does a marble at the top of a ramp convert all of its potential energy up the top, into kinetic energy at the bottom of the ramp...or...
  9. M

    Who are Some Renowned Civil Engineers Behind Iconic Structures?

    Homework Statement We are required to write an essay about a well-recognized engineer, who has designed numorous well-known structures(bridges, monuments etc.) internationally (preferably). Homework Equations I just need a couple of NAMES of those engineers and they have to have...
  10. P

    I=kV^n filament lamp hnc assignment

    Homework Statement what does k and n relate to? i can work them out but don't know exactly what they are. Homework Equations I=kV^n The Attempt at a Solution i think the k and n have something to do with temperature and the tungsten metal in the lamp (coefficient of resistance?)...
  11. A

    Urgent: Prove Smoothness of f(x) with Infinite Derivatives

    Homework Statement f(x)=\left\{\begin{array}{cc}e^{-x^{-2}},& \mbox{ if } x!=0 \\ 0, \mbox{ if } x=0 \end{array}\right Prove the smoothness of f(x) - as in - prove it has infinite derivatives. I was asked this question in a calculas class i have in university...It just so happens to be...
  12. I

    What is the roller coaster's final speed at the bottom?

    Homework Statement A roller coaster is lifted up 50m above the ground to the top of the first hill and then glides down around the track at the bottom. If it had a velocity of 3.0 m/s at the top of the lift and loses 10% of its total energy to friction as it glides down, what is the roller...
  13. N

    Advice for High School Student's Quantum Mechanics Assignment

    Hi I have been given an interdisciplinary assignment in physics and mathematics. The product of this impending project should be a paper of approximately 15-20 pages. My chosen subject is quantum mechanics. I would very much like your ideas and advice concerning the organization and the...
  14. A

    Help with Data Structures Assignment Needed

    "]Dear all; I have this assignment in data structures, and it needs for a lot time to solve it by myself really I'm buzy and I stick on it for A long time, I want it as soon as much anyone can:cry:[/FONT] Regards; LoLO:blushing:
  15. I

    How to Design a Car Powered by a Suspended Mass for a School Project?

    Hey please help me out here ...i m in grade 11 and i got this assignmnt ..where i have to design a car that will move forward from a suspended mass...i hav no idea wot to do ... itz due this frdaypleasez i really need help...none of my grou members are helping me out .
  16. B

    Need help by 10:00 tonight (when assignment is due)

    Homework Statement http://xs221.xs.to/xs221/07452/graphhelp.PNG Find the initial x velocity and initial y velocity. Homework Equations vx0=vx The Attempt at a Solution I tried putting 0 as both, but later realized that it has to have some initial x/y velocity or the graph would...
  17. D

    Want help regarding my classical mechanics assignment

    Homework Statement I need to write a C program to simulate physics problems. My job is to write a code , in which I give the user a function F(x) = ax^n + bx^(n-1) + ... , and user inputs the coefficients a,b,c ... and my computer code should tell whether the given force F(x) is conservative...
  18. E

    Special relativity assignment topic help

    hey all, i've recently been given an assignment of special relativity, the question is as follows:- Topic B: SPECIAL RELATIVITY Write a short report on any experiment, published in the literature (ie journals), which proves or depends on a relativistic effect. Include essential experimental...
  19. B

    Need help on freefall by 10:00 EST tonight Assignment is due today.

    This is due by 10:00 tonight, I have gotten all the problems right except for the last one which I cannot figure out. If anyone could help that would be nice. :) Thanks. Homework Statement A lit firecracker is shot straight up into the air at a speed of 54.00 m/s. How high is it above...
  20. M

    Weekend Assignment sheet - question

    Weekend Assignment sheet -- question Homework Statement An observer is located at a unknown distance away from a cannon. A cannonball is fired from the cannon at 425 m/s. If the cannonball goes past the observer 0.20s before the sound is heard, how far away is the cannon from the observer...
  21. M

    How Do I Design an Algorithm to Convert Height and Weight Measurements?

    Homework Statement The assignment was to design an algorithm that asks for a user's height in feet and inches and their weight in pounds. The output of user's height and weight is suppose to be the user's height in meters and the user's weight in kilos. So I'm basically just suppose to convert...
  22. O

    Help with 3rd year assignment on light

    Hello all. I'm in my 3rd and final year in high school and the big 3rd year paper is coming up. I'm writing in physics (and history) and I have about light. The specific topic isn't decided yet and therefore I need some books to help me decide. This is were you come into the picture. I need...
  23. D

    Assignment On Couples and moments

    [Urgent]Assignment On Couples and moments Homework Statement Two coplanar couples equal and opposite moments balance each other Hint: Case1: lines of action constituting the couple intersect Case2: lines of action constituting the couple do not intersect Above is what the lecturer...
  24. K

    Difficulties with my assignment. Need help if anyone is up to it.

    [SOLVED] Difficulties with my assignment. Need help if anyone is up to it. Homework Statement Hello. I need to rewite the formula B so that it will become formula A, step by step. I need to explain what I do every step of the way and write all the middle-calculations also. That is, so that I...
  25. P

    Lamarsh Assignment: Discover the 7-10 Rule for Fission Product Activity

    Fission product activity measured at the time t0 following the burst of a nuclear weapon is found to be a0. Show that the activity at the time t=7^nt0 is given approximately by a=a0/10^n. This is known as the 7-10 rule in civil defense.
  26. M

    Trusses Assignment: Help Needed for Sources and Calculation

    Homework Statement I'm currently doing a assignment about trusses, it's all about the theory, concept, animation and calculation. However, I'm lack of sources for doing this assignment. So, can anyone please kindly recommend some useful links to me? Thank you... : )
  27. K

    Spring and friction assignment

    another physics question..please Albertine sits ina reclining chair, in front of a large, compressed spring. The spring is compressed 5m from its equilibrium position, and a glass sits 19.8 m from her outstretched foot. Assuming that Albertine's mass is 60kg what is the coefficient of kinetic...
  28. N

    C/C++ C++ Object-Oriented Assignment: Test Your Motion Knowledge

    Hi Everyone I have a object oriented C++ assignment which is due this week and I have no idea as to how start it.... This program prints a motion verb ( fly, run, swim, crawl, walk, or roll ), waits for a second, then prints the name of an entity and repeats the verb (for example: fly ..1s...
  29. R

    C/C++ How to Simulate Projectile Motion in C++?

    hi I am having trouble doing this assignment. I have very little knowledge of c++ and the truth is i don't even know where to begin. Can someone please help me with it. the program I am supposed to be writing is as follows: compute the height of a projectile that was launched. You will...
  30. A

    Student Facing Criminal Charges for Writing Assignment

    Here's an interesting piece of news I found today: http://www.msnbc.msn.com/id/18353425/&GT1=9246" Apparently a student wrote a violent essay for a creating writing assignment, and he's being criminally charged. The maximum jail time is 30 days. I'm no legal expert, but I'm quite...
  31. S

    Hard emperical formula question for assignment

    Hi all, I'm quite new to posting; just been reading around the forums when I came upon this question for my assignment. I'm really quite stuck and no idea how to relate the different values (such as number of moles of Barium Sulfate) found back to the unknown compound. An unknown compound...
  32. F

    How can I design an experiment to test bouyancy for my physics EEI?

    This if my first post and I think this is the right place to post this, hope so anyway. Just wondering if you guys had any ideas for a physics experiment relationg to bouyancy. I have to do a EEI (extended experimental investigation) for physics and so far I don't have too many ideas. I can...
  33. C

    Solve Calculus Assignment: Show x^3 - 3kx + 1 ≠ 0 & Find Discontinuity of u(x)

    1.Show that x^3 - 3kx + 1 = 0 does not have two distinct roots when k<0 2.Locate the points of discontinuity for the functions : a.) f(x)= 2u(x-3)-u(x-4) b.) g(x)= [u(x)-u(x-pie/2) u(x) is a unit step function. Could u guys help me out, I have no idea how to solve this..
  34. P

    Help with interpreting lab assignment: factors affecting Friction

    Homework Statement I am responsible for coming up with an experiment to determine how the following 3 factors affect the force of friction: weight, surface area and speed. The directions given inlcude: "You will need to measure the magnitude of the force of friction. Since the...
  35. B

    Bathymetry, Sediments, and Plate Tectonics assignment

    Homework Statement Assignment is located at: http://typhoon.wcp.muohio.edu/boardman/GLG444/Exercises/PTect/BathySedAge.html" Homework Equations N/A The Attempt at a Solution I can not figure out the following: 1. a. Calculate the depth to the ocean crust (sediment depth plus...
  36. F

    I am currently doing an assignment based on brittleness.

    I am currently doing an assignment based on brittleness. But it seems like there is not much information I can get by google it..Can anyone help me to find more information about this topic? Thanks in advance..:smile:
  37. P

    Calculating a GPA from numerous assignment and test grades

    math problem: pedro wants to calculate his gpa. he has the lab grades:90/100,98/100,90/100,94/100,90/100,90/100,95/100,98/100. Labs are worth 20%. He has the test grades: 9/10,6/10,10/10,10/10,5/10,7/10,7/10,7/10,10/10,10/10,8/10,10/10. Homework is worth 20% test grades are: 35/100...
  38. M

    Aerospace Engineeering Assignment

    Hi people, i am really in a deep trouble and i will be so happy if anyone can help. Any tips will be so appreciated and make a real different to what i am going through at the moment. i have got two question to answer. 1. Experiment of boundry layer on a flat surface : giving dtails of how...
  39. H

    The assignment driving me crazy

    Guys, Can you loot at these questions? This is the assignment but it is too hard to solve. Please look at attached file..
  40. S

    Researching Industrial Pollution: Tips and Links for Assignment Help

    i have gotten an assignment to research on industrial pollution problem is google searches are tooo vague can anybody help me with some solid links where i can get the info i need information in general not for any particular country please please please some body help thanks to all helpers
  41. C

    How Can I Control a Temperature-Sensitive Fan Heater with a Mitsubishi FX1N PLC?

    Here We Go. I have been asked to produce a program using GX Developer. The PLC i have to use is a Mitsubishi FX1N(C). I have to produce a program which will control a temperature sensitive fan heater in a hallway which leads to 2 adjacent rooms. The Heater and fan are designed to operate under...
  42. H

    Projectile Motion assignment - Building a projectile launcher

    I need help/advice on building a simple projectile launcher, for a tennis ball or smaller object. I need to calculate the angle so it must be something that shoots fairly straight (ballista?). Any links or advice on this would be much appreciated ~Hans
  43. JasonRox

    Can You Pass a Midterm and Complete an Assignment When Sick?

    I'm so screwed now. I can barely think hard enough to do my Topology assignment and that's my strongest class. Not to mention a Probability midterm tomorrow that I was on my way to being prepared. :cry: I hope I pass the midterm. :cry: I'm so useless right now. Going to bed soon...
  44. C

    Computer science assignment. (strings)

    i need a make a program that prompts the user to enter a string, and for it to identify the uppercase characters and replace each uppercase char with the corresponding lowercase character. it also needs to count the character here's what i have so far: #include<stdio.h>...
  45. E

    Did I Prove the Vector Proof Assignment Correctly?

    Hi there, I had an assignment due today for my advanced maths class, I've already handed it in, but seeing what other people did I began to worry/wonder about what I did. The question was pretty simple: For non-zero vectors show that: |a - b| = |a + b| if and only if venctors a and b are...
  46. P

    Help With Assignment Questions (Forces)

    If anyone can give me any steps to take, or formulas to use when solving these I would REALLY appreaciate it. These ones have really stumped me.:frown: 1. Beavis and Butthead are out in space, or you may say "spaced-out". The force of attraction between them is 30N. Suddenly, Beavis takes a...
  47. C

    How Can You Efficiently Count Age Groups in C Programming?

    the assignment wants me to count the number of people in age groups and to report the number of people in each group. i came up with this, used an int for each group and incremented with if/else if statements. #include<stdio.h> main() { int x, infant, young, middleaged, old, older...
  48. M

    Triangle Problem: Calculate Perpendicular Bisector

    assignment question URGENT! I having trouble and its urgent some one help Triangle wit the vertices A(6,-15)B(22,17)and C(24,11) -midpoint of side A = (14,1) Question 1.Calculate the equation of the line that is perpindicular bisector of the side triangle.
  49. A

    Some questions about my assignment of functions

    Hi, I've been sick over the last week (strep throat) and I just found out today that I have to hand in an assignment by 2pm. I've completed all the problems but 4 which I don't know how to do. If someone could do them or help me do them asap i'd be forever grateful. 1)Is the following graph...
  50. K

    HELP Assignment due in an hours

    HELP ! Assignment due in an hours A gold ball is hit from ground @ 25* to the horizontal. When it lands, it has a velocity of 20 m/s @ 30* below horizontal. A) find initial speed B) time that ball is in air C) height of landing pt. relative to start pt, which may be positive or negative
Back
Top