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. K

    Air Resistance and Projectile Motion Assignment Task

    1. Hi, I'm currently in my second last year of high school (Australia) and my Physics assessment task is all about cars, however, a stimulus Item is the Movie Speed, long story short, I need to find the minimum angle required, including air resistance at a velocity of 30 m/s. 2. I have tried...
  2. tsuwal

    Need a suggestion for an assignment on fiber optics.

    I am finishing a course on Eletromagnetism and Optics. I am currently a physics student in the second year of university. I passed the final exam and now I'm supposed to do a work on fiber optics. Do you know any interesting problem that i could adress? It can be a hard one, I am supposed to...
  3. N

    How to do hydrocyclone calculations in this assignment?

    I am a chemical engineering student and our lecturer gave us this assignment. I completed part two of the assignment but this is part one. Nobody in my class seems to know exactly what to do. It's hard to understand what exactly he is asking for. I can write the MATLAB code once I understand how...
  4. M

    Find a link between physics and assignment problems

    Hi ! I've been working about assignments problems and how to solve them. I will have to do a presentation about it in few weeks. However, I'll have to do it in front of 2 judges: one specialized in math and one in physics. Because i don't want the physician to get bored during my...
  5. J

    Physics Summer Assignment Question

    Homework Statement F=(9.0x10^9Nxm2/C2)(3.2x10^-9C)(9.6x10^-9C)/(0.32m)^2 The x in between the N and m is a multiplication symbol, not a variable. The Attempt at a Solution I'm not asking anyone to solve this for me, I just need a little direction. Thanks in advance.
  6. C

    Your assignment: Design a post-apocalyptic communication system

    I'm a programmer but weak on hardware so I'd appreciate your help. In a novel I'm writing there are about one hundred underground cities housing one million people in the US; the rest of our population is dead. Somewhat smaller percentage of survivors in Europe and Asia. We have several years...
  7. V

    QM: Problem with an assignment using bra and ket notation

    Homework Statement This problem is about the 1-dimensional harmonic oscillator. The normalized energy levels are labeled |n>, n=0,1,2... Two operators are given by \widehat{A} = \alpha (\widehat{a}++\widehat{a}-) \widehat{B} = i\beta (\widehat{a}+2+\widehat{a}-2) where \alpha and...
  8. C

    [P CHem] HCL/DCL r and p branch J value assignment

    Homework Statement Assign J values for P and R branches of H35cl, H37cl, d35cl, and d37cl compounds. Homework Equations The Attempt at a Solution I have a fundamental IR spectra I did on and HCL/DCL compound. I'm extremely confused how to assign J values. I've been looking online...
  9. D

    Electronics/Power supply assignment questions

    Homework Statement Hello all, there are three fairly simple electronics related questions of an assignment to be handed in tomorrow, and whilst the initial answers as obvious, I'd greatly appreciate some assistance on elaborating on certain questions: 1. Explain the reasons for requiring...
  10. S

    Equilibrium question on review assignment, quick (I have a test tomorrow).

    Homework Statement A rod of negligible mass is supported by a hinge at the wall by a horizontal wire fastened at a 30 degree angle one-third of the way along the rod. A weight of 12 N hangs from the left end of the rod. a) Find the tension (T) in the horizontal wire. (T = 62.2 N) b) Find...
  11. P

    Help with Mine Engineering Assignment Questions

    Hi I am doing a mine engineering degree by correspondence and I have an assignment to do and the lecture notes do not provide any assistance on some of the cals. I am hoping some of you can help me I will start with these two questions and see if you can help before posting more: Q1)...
  12. P

    Help with Mine Engineering Assignment Questions

    Hi I am doing a mine engineering degree by correspondence and I have an assignment to do and the lecture notes do not provide any assistance on some of the cals. I am hoping some of you can help me I will start with these two questions and see if you can help before posting more: Q1)...
  13. T

    Handicapped pendulum assignment

    "Handicapped" pendulum assignment Hello everyone, I was wondering if anyone could help me with an assignment about a "handicapped" pendulum (you got to love the professor's taste for scientific terminology). By "handicapped", it is meant that the pendulum is attached to a stationary point...
  14. R

    Help Needed: Last Physics Lab Assignment Rod Problem

    I need to get a 100 on this last Physics lab assignment, but I can't get this "rod" ...problem :( Help would be appreciated (a) L1 = (65 cm)/2 = 32.5 cm "CORRECT" (b) [(149 kg)(1) + (149 kg)(65 cm) + (149 kg)(65 cm + 32.5 cm)] / (3)(149 kg) = (149 + 9685 + 14527.5) / (447) =...
  15. W

    Solving a Homework Assignment: Airplane Flight in a Windy Day

    Homework Statement an airplane, whose air speed is 580km/h, is supposed to fly in a straight path 38N of E. But a steady 72km/h wind is blowing from the north. In what direction should the plane head? i know the answer is 43.6 N of E but i am not completely sure how to get it Homework...
  16. I

    Matlab Approximate the Integral Assignment

    Homework Statement Hey Everyone! So I have an assignment that says to approximate the integral f(x)=e^(3x), -1<x<3. Answer the following questions Run the code with N=10, N=100, and N=1000. For each approximation, when does the result agree with the exact value of the integral to 4 digits? How...
  17. R

    Answer confirmation-not an assignment question.

    Hi! I have attached the picture. Can someone please tell me what equation of motion will be? My guess is that it will be \ddot{x} = -k/x -kx/2
  18. H

    Advanced Egg Drop Assignment - Create a Rocket & Vehicle for Success

    Having a little trouble with this latest advanced egg drop assignment. The main assignment has two parts - 1. Create a rocket that can reach a minimum height of 120 ft 2. Create a vehicle that can land with an egg for a passenger, and not have it crack. We also aren't allowed to use...
  19. L

    Need to interview an engineer for assignment

    Hello. I'm a freshman in college and I'm taking an engineering introduction course. Our assignment for this week is to interview an engineer who has a four-year degree in engineering. So I'm coming here for help! Any reply much appreciated! Here are the questions: 1.Which field of mechanical...
  20. L

    How Do You Calculate Tension and Angle in a Two-Mass Pulley System?

    Homework Statement In the figure a box of mass m1 1.0kg, on a frictionless inclined surface is connected to another box of mass m2  2.0 kg . The pulley is massless and frictionless. An upward force of magnitude F = 6.0 N acts on m2 , which has a downward acceleration of 5.5 m/s2. What are...
  21. S

    Engineering Help with assignment AC-Circuit:

    Homework Statement Hi i tried this problem i attached(jpg one) but i don't think i am doing it right as I am getting a really small number and also would how would you calculate the apparent power over dependant source because i don't think i did that right either Homework Equations...
  22. 1

    Forces applied to occupants in car crash (important for assignment )

    Forces applied to occupants in car crash (important for assignment!) Ok so I'm in grade 10 at school and for my physics assignment I'm comparing the forces applied on the vehicle (or occupants) in a collision, where one car has a crumple zone and the other one doesn't. If they were both...
  23. A

    Quest assignment question 17 (for my hw)

    Homework Statement The average mass of an automobile in the United States is about 1.419 × 106 g. Express this mass in kilograms. Homework Equations The Attempt at a Solution Well I did dimensional analysis doing these exact steps to get the mass in kg: I...
  24. J

    Can not figure out my ? Subscripted assignment dimension mismatch-problem

    Can not figure out my ? Subscripted assignment dimension mismatch-problem EDIT: This is Matlab code. Hello! I have some MATLAB code and I've run into a problem that I can't seem to be able to solve. I hope that someone might help me find a solution. Here is the error ? Subscripted...
  25. S

    Requesting (advice) and help on academic assignment.

    1. The situation Hi, I'm in the UK and just finished my first year of college, and now I need to do a 2000 word academic assignment (on physics) for my college so I can show Unis. I am 17 and a competent, interested young physicist. 2. The problem I am very much interested in physics...
  26. E

    Finding General Formula for Bungee Jumping - Maths C Assignment

    Good morning/evening fellow physics enthusiasts. For my year 12 maths c class, we're doing an assignment on bungee Jumping (Task sheet can be found by googling "maths c bungee jumping" first link will be the relative one (pdf file)). For this assignment, the first question asks you to find...
  27. S

    Discrete Mathematics - Basic Set Theory : Assignment review : Q2

    Question 2: -------------------- Homework Statement Consider the following sets, where U represents a universal set : U = {1, 2, 3, 4, ∅, {1}} A = {1, 3} B = {{1}, 1} C = {2 , 4} D = { ∅ , 1, 2 } Homework Equations A+D is the set : (Choose only one ) 1. {1, 3}...
  28. S

    Discrete Mathematics - Basic Set Theory : Assignment review : Q1

    Question 1 : -------------------- Homework Statement Consider the following sets, where U represents a universal set : U = {1, 2, 3, 4, ∅, {1}} A = {1, 3} B = {{1}, 1} C = {2 , 4} D = { ∅ , 1, 2 } Homework Equations Choose the correct option : D - B is the set ...
  29. R

    Help with Last Part of Assignment

    i have typed and attached my question and my attempt here with. I am sure I know what I am doing but its a last part I am not sure about so any help would be great. Thanks
  30. L

    What do Engineers Read? Homework Assignment

    I've been given a school assignment that if I were to, hypothetically, gets a story published on an engineering success story, what publication would I choose and why? Although this is a pretend situation, my professor will take no hesitation to fail the assignment if I am unable to provide a...
  31. B

    Year 11 Physics assignment. General help.

    Homework Statement A car of mass 1600kg is allegedly traveling at 60Km/h and an explosion breaks it into 3 pieces. One of the pieces contained the driver and had the brakes still functioning. The piece containing the driver left a skid mark 4.33 meters long and the coefficient of friction...
  32. shinnsohai

    Question About Assignment - accelerations, velocities and distances

    Question About Assignment -- accelerations, velocities and distances Homework Statement Q1. Homework Equations Q1.What will be the distance traveled by each buses since t=0s? Q2. Explain how it is possible for 1.a body to undergo acceleration even though it is momentarily at rest...
  33. D

    Physics Assignment - Efficiency of an Electrical Appliance - Kettle.

    Homework Statement Hey physicists. I have a problem. My assignment this term for physics is to test the efficiency of an electrical appliance, and to make suggestions on how to improve the efficiency for the future. I conducted a number of experiments on the kettle, using 2 different kettles...
  34. J

    Comp Sci Fix C++ Compiling Error - Need Urgent Homework Help | CreditAccount

    Homework Statement Well I have written my entire program for my assignment, but I cannot get it to compile without multiple instances of the same error: "expected primary-expression before ']' token. Can anybody see a mistake I am making? I would greatly appreciate your help, thank you...
  35. J

    I am accused of copying four sentences from Wikipedia in one of my assignment

    It’s a 12 page assignment completely based on C++ simulation. I got the result and then I describe the results according to my numerical analysis while I was describing the result four of the sentences exactly match with Wikipedia. During coding in C++, I did not copy a single line from...
  36. G

    What is the concept of xor in MATLAB?

    Homework Statement (see attached files) basically, I have to solve a puzzle game simulated by matlab. In a school of n students with n lockers, each student opens and closes a locker they walk by. all the lockers start the game closed. the first student changes every locker's status...
  37. T

    Fortran FORTRAN Programming Error: Incomparable ranks 0 at and 1 in assignment.

    Hi guys having a problem with my code, FORTRAN keeps stating: lambda(k+1)=(newsum/oldsum) Error: Incomparable ranks 0 at and 1 in assignment. The code is below: subroutine powerit(a,b,c,E,n) implicit none real, intent(in) :: E real, intent(inout) ...
  38. xaratustra

    Fortran Fortran complex array assignment

    I have a an array of type complex. I am trying to assign a value to it in a loop, but I get a strange error "Unclassifiable statement at (1)". I really don't understand why. do t = 1, count real(in(t)) = cos(2 * pi * f0 * t) aimag(in(t))=sin(2 * pi * f0 * t) end do thanks.
  39. B

    Online Assignment L'Hospital's Rule True/False 1try left only

    I have used 9 out of 10 tries and there is only 1 try left! Anyone knows what I am doing wrong?
  40. G

    MATLAB programming assignment (for loop)

    Homework Statement (see attached file) Homework Equations (see attached file) The Attempt at a Solution isbn=input('Enter 9 Letter ISBN number: ','s'); for i=1:1:length(isbn) (%indent)num=str2num(cat); (%indent)check=num*i %somewhere in...
  41. G

    MATLAB assignment help (first time poster)

    Hey guys. First time posting on here. Hope I don't step on any toes with this post; not to familiar with how things work around here. Basically, I'm super frustrated with this programming assignment I've been given. Been working for about 4-5 hours in between classes and can't seem to...
  42. QuarkCharmer

    Turn in assignment, then realize mistake ugh

    I have 100 on every assignment/test in my DE course. Today, I took one quiz out of many (of which 2 are dropped) on using Laplace transforms to solve equations. I have done dozens of these problems, with great success. Today, the quiz was 2 problems, both of which relied heavily on the fact...
  43. N

    ASSIGNMENT QUESTIONS- with algebra equations

    i don't understand these equations and can't find a way to do them from my textbook or any websites please help.. (a) √(2^2+2 x 2+1) (b) -√(〖25〗^2-) 〖24〗^2 (c) (7x +y)^2 - (7x - y)^2
  44. K

    Assignment question, root, Intermediate Value Theorem

    Homework Statement Prove that Prove that the equation has at least one positive real root, using the Intermediate Value Theorem on an appropriate function. 3 arctan(2x-1)=cos^2(x-(∏/6)) + 1 Homework Equations No clueThe Attempt at a Solution I honestly speaking have no clue how to even...
  45. B

    Fields in Physics assignment question about electron beams in a cathoe ray tube

    Homework Statement Ok so we have been given a diagram of a cathoe ray tube, with relevant data on it. The second question asks to "calculate the speed of the electron, using data from the first question". I need to make sure the answer is correct as it leads into many different questions...
  46. M

    Financial Assignment involving annuities

    The Question is as follows; An individual age 30 is planning to start investing in a personal pension. Her aim is to have sufficient funds to provide a monthly pension of £1000 when she retires at the age of 65, payable for 30 years. She is able to make bi-annual contributions to the fund...
  47. S

    Biology Genetics Assignment: Analyzing IOB Mutation Reversion Rates

    Homework Statement You decide to revert an iob- mutant to wild type (IOB+) using different mutagens and find the following reversion rates for each mutagen tested: 2-amino purine - 98% 5-bromouracil - 95% Nitrous acid - 94% Proflavin - 2% Spontaneous - 4% 1. What is the most likely...
  48. M

    Assignment calculus,simultaneous equation and logarithm

    Homework Statement Hi, teachers I have been doing some work but I am confused. Have you ever heard of this great math website www.wolframalpha.com (Google for maths). This is one questions I done differantiate 3e^-4tsin(5t) and here is the link for the answers from...
  49. H

    Conducting a Tensile Test Assignment: Materials and Conclusions

    Hi all, I am doing a tensile test assignment and I've hit a brick wall with regards to research just wondered if anyone had any good pointers or books i could look up. I have 3 materials in the tensile test which i have plotted stress/strain graphs for which is all good and well and from...
  50. K

    Can Online Forums Offer Immediate Help for Urgent Assignments?

    Have an urgent assignment... I have a urgent assignment please if there is anyway you can skype or chat with me to help pm me right away. I really need the help..
Back
Top