Question: what am i doing wrong? This zyLab activity prepares a student for a full programming assignment. Warm up exercises are typically simpler and worth fewer


This zyLab activity prepares a student for a full programming assignment. Warm up exercises are typically simpler and worth fewer points than a full programming assignment, and are well-suited for an in-person scheduled lab meeting or as self-practice A variable like user num can store a value like an integef. Extend the given program as indicated. 1. Output the user's input. ( 2pts) 2. Output the input squared and cubed. Hint Compute squared as user_num * user_num. (2 pts) 3. Get a second user input into user num2, and output the sum and product. (1 pt) Note: This zyLab outputs a newline after each userinput prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values dont actually appear as output when the program runs Enter Integer: 4 You entered: 4 4 squared 1326 And 4 cubed ia 64lt Enter another integer: 54+5is945in20 1.12.1: LAB: Warm up: Basic output with variables main.py Load default templat 1 user_num = int(input('Enter integer: ')) 2 print('You entered:', user_num) 3 print(user_num, 'squared is', user_num " user_num) 4 print('And', user_num, 'cubed is', user_num ' user_num " user_num,' I!') 5 user_num2 - int(input('Enter another integer: In')) 6 print(user_num, '+', user_num2, 'is', user_num + user_num2) 7 print(user_num,' '*', user_num2, 'is', user_num + user_num2) 8 9 \# Type your code here Run 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. Input(fromabove)Output(shownbelow) Program errors displayed here Traceback (most recent call last): File "main.py", line 1, in module> user_num = int (input ('Enter integer: ln) ) ValueError: invalid Hiteral tor int () with base 10: 'Enter Integer:' Program output displayed here Enter Integer: Coding trail of your work
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
