Chat with us, powered by LiveChat While the zyLab platform can be used without training, a bi - Writeedu

While the zyLab platform can be used without training, a bi

1.11 zyLab training: Basics

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.

  1. 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.
  2. Type 2 in the input box, then click "Run program", and note the output is 4.
  3. 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.

  1. Click the "Submit mode" tab
  2. Click "Submit for grading".
  3. 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.

  1. Click on "Develop mode", and change the output statement to output a newline: System.out.println(userNumSquared);. Type 2 in the input box and run.
  2. 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.

  1. 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).
  2. 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.

487828.3426420.qx3zqy7LAB ACTIVITY1.11.1: zyLab training: Basics0 / 3

NumSquared.java

Load default template…123456789101112131415import java.util.Scanner;public class NumSquared { public static void main(String[] args) {  Scanner scnr = new Scanner(System.in);  int userNum;  int userNumSquared;    userNum = scnr.nextInt();    userNumSquared = userNum + userNum;   // Bug here; fix it when instructed    System.out.print(userNumSquared);   // Output formatting issue here; fix it when instructed   }} Develop modeSubmit modeRun your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box.Enter program input (optional)Run programInput (from above)trending_flatNumSquared.java(Your program)trending_flatOutput (shown below)Program output displayed here
Coding trail of your workWhat is this?6/29R-F-min:3Feedback?

    Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteEdu. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

    Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

    Do you need an answer to this or any other questions?

    Do you need help with this question?

    Get assignment help from WriteEdu.com Paper Writing Website and forget about your problems.

    WriteEdu provides custom & cheap essay writing 100% original, plagiarism free essays, assignments & dissertations.

    With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.

    Chat with us today! We are always waiting to answer all your questions.

    Click here to Place your Order Now