Edit View Insert Format Tools Table Window Help U 8 a valid Assignments v1[compa
ID: 3788838 • Letter: E
Question
Edit View Insert Format Tools Table Window Help U 8 a valid Assignments v1[compatibili... search in Document Design Layout References Mailings Review View New Ro... 12 Aa A Aa Valid Assignments If myAge is an integer variable, yourRate is a foat variable, and departmentCode is a string variable, which of the following statements are valid assignments? If a statement is not valid, explain why not. float yourRate; string depanpocatCode; Valid Invalid Reason Valid 2, myAge yourRate: Valid Invalid Reason Invalid because ygurRate is not a whole number itis another variable. 3. my Ase-departneoCodes Valid Invalid Reason Invalid and same reason as question 2. Valid Reason Invalid because one not a string so it doesn't need double quotations and two dspartnggscode is not a whole number Valid Invalid Reason Invalid because RyAgs needs to be on the left side and the number 42 on the right to be valid. 6. yourRats 3.5; Valid Invalid Reason Valid Valid invalid 234 Words English (US) Intro to Comp:Prog Logic/Desig (C... organic Chemistry Lab (CHEM-2 CHEM-2211-M01 CSCI-1923-M01 Spring 2017 (201720) Spring 2017 (201720)Explanation / Answer
1. valid because myage is integer type and 23 is an integer
6.valid because 3.5 is a float and it is assigned to float type variable
7.invalid because variable are not same type
8.invalid because your rate will not hold a string
9.invalid because we cannot assign a value to a value
10.invalid because the string should be enclosed with " "
11.valid because the string is correctly assigned to the variable
12.invalid because the variable holds the string type not integer
13.valid because the string is correctly assigned to the variable
14.invalid because of type mismatch
15.invalid because of type mismatch
16.invalid because we cant assign a string to a constant
17.invalid because we cant assign a string to a string which is not a variable
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.