In: Computer Science
In Coral Code Please!!!! 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.
When students are done developing their program, they can submit the program for automated grading.
Matching output exactly, even whitespace, is often required. Change the program to output an ending newline.
The last two test cases failed, due to a bug, yielding only 1 of 3 possible points. Fix that bug.
2.12.1: zyLab training: Basics
0 / 3
main.py
Load default template...
1
2
3
4
userNum = int(input())
userNumSquared = userNum + userNum # Bug here; fix it when instructed
print(userNumSquared, end=' ') # Output formatting issue here; fix it when instructed
coral square the number
#source code:
integer userNum
integer userNumSquared
userNum = Get next input
userNumSquared=userNum*userNum
Put userNumSquared to output
Put "\n" to output
enter 3
#source code for the double the number
integer userNum
integer userNumSquared
userNum = Get next input
userNumSquared=userNum+userNum
Put userNumSquared to output
Put "\n" to output
#if you have any doubt or more infomration needed comment below..i will respond as possible as soon..thanks..