1.Why is the data type of an identifier important? What is the difference betwee
ID: 3871480 • Letter: 1
Question
1.Why is the data type of an identifier important? What is the difference between a weakly typed (python) and strongly data typed (java) programming language.
2. What is operator precedence? How can a debugger help you an find operator precendance error?
3. Describe one benefit and one weakness of both pseudo code and flow charts.
4. With pseudo code: define, initialize, reference, and assign a variable. ( four parts to answer- identify each answer)
5. Define in order the steps/phases of SDLC and one activity you would find in each.
6. Give me two example scenario's of why modules would benefit an application you are designing.
7. Create in pseudocode logic that would count down from 10 to 0 by one's using a looping structure. Using a decision structure from within the loop, print "Found It" when you reach count equals five.
Explanation / Answer
Answer 1 : Data type defines what type of data the identifier will store and it allocates memory for it accordingly. If it is not there then the program will not know what data it will store hence it will not be able to allocate memory for it, giving an error.
In weekly typed language, the value of a variable depends on how it it used at runtime.
For example if an addition operator is used with two strings it will concatenate the strings, and if used with integers it will give the addition value.
In strongly typed language the type of value that aa variable can hold cannot be changed. To change it we have to use convertTo() functions to change it.
Answer 2:
Operator precedence determines the grouping of terms in an expression and how the expression will be evaluated by first evaluating the resut of the grouped expression and then using the result with the rest of the expression.
The debugger converts the expression into postfix or prefix notation and pushes the operator and the operands accordingly into a stack memeory. Then it pushes each of these and performs calculations accordingly.
Answer 3:
Pseudocode: It gives non-programmers the view of how the program will work step by step.
Advantage:
Disadvantage: The basic nature of pseudocode sometimes causes nonprogrammers to misunderstand the complexity of a coding project.
Flowchart:
Advantage: It clearly describes the processes and the logic flow of a system
Disadvantage: If a program logic is very complex, the flow chart may become complex to understand and clumsy also.
Answer 4:
START
Declare counter //define
Initialize counter to zero //initialize
If counter greater than Zero //Reference
Print “Success”
Else
Counter = counter -1 // assign to a variable
Print “faliure”
STOP
I have solved your question. Please do not forget to give a positive like to the answer. Thank you.
As per Chegg policy we can only answer first four part of a question, you can post the rest of the questions newly.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.