subject

While the zyLab platform can be used without training, a bit of training may help some students avoid common issues. The assignment is to get an integer from input, and output that integer squared, ending with newline. (Note: This assignment is configured to have students programming directly in the zyBook. Instructors may instead require students to upload a file). Below is a program that's been nearly completed for you. Click "Run program". The output is wrong. Sometimes a program lacking input will produce wrong output (as in this case), or no output. Remember to always pre-enter needed input. Type 2 in the input box, then click "Run program", and note the output is 4. Type 3 in the input box instead, run, and note the output is 6. When students are done developing their program, they can submit the program for automated grading. Click the "Submit mode" tab Click "Submit for grading". The first test case failed (as did all test cases, but focus on the first test case first). The highlighted arrow symbol means an ending newline was expected but is missing from your program's output. Matching output exactly, even whitespace, is often required. Change the program to output an ending newline. Click on "Develop mode", and change the output statement to output a newline: print(userNumSquared). Type 2 in the input box and run. Click on "Submit mode", click "Submit for grading", and observe that now the first test case passes and 1 point was earned. The last two test cases failed, due to a bug, yielding only 1 of 3 possible points. Fix that bug. Click on "Develop mode", change the program to use * rather than +, and try running with input 2 (output is 4) and 3 (output is now 9, not 6 as before). Click on "Submit mode" again, and click "Submit for grading". Observe that all test cases are passed, and you've earned 3 of 3 points.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:00
11. is the ability to understand how another person is feeling. a. authority b. sympathy c. empathy d. taking a stand
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
question
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 22.06.2019 23:00
Which type of tab stop is most for weights and measurements?
Answers: 1
You know the right answer?
While the zyLab platform can be used without training, a bit of training may help some students avoi...
Questions
question
Mathematics, 15.11.2019 04:31
Questions on the website: 13722361