Question

Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below the next line, but such values don't actually appear as output when the program runs. Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! Enter another integer: 5 4 + 5 is 9 4 * 5 is 20 536024.3979308.qx3zqy7 LAB ACTIVITY 1.20.1: LAB: Warm up: Basic output with variables main.py 1 user_num = int(input('Enter integer:\n')) 2 3 int = 4 Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. input values in the first box, then click Run program and observe the pro

          Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below
the next line, but such values don't actually appear as output when the program runs.
Enter integer:
4
You entered: 4
4 squared is 16
And 4 cubed is 64!!
Enter another integer:
5
4 + 5 is 9
4 * 5 is 20
536024.3979308.qx3zqy7
LAB
ACTIVITY
1.20.1: LAB: Warm up: Basic output with variables
main.py
1 user_num = int(input('Enter integer:\n'))
2
3 int = 4
Develop mode Submit mode
Run your program as often as you'd like, before submitting for grading.
input values in the first box, then click Run program and observe the pro
        
Show more…
Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below
the next line, but such values don't actually appear as output when the program runs.
Enter integer:
4
You entered: 4
4 squared is 16
And 4 cubed is 64!!
Enter another integer:
5
4 + 5 is 9
4 * 5 is 20
536024.3979308.qx3zqy7
LAB
ACTIVITY
1.20.1: LAB: Warm up: Basic output with variables
main.py
1 usernum = int(input('Enter integer:'))
2
3 int = 4
Develop mode Submit mode
Run your program as often as you'd like, before submitting for grading.
input values in the first box, then click Run program and observe the pro

Added by Alexis P.

Close

Computer Science and Information Technology
Computer Science and Information Technology
Trishna Knowledge Systems 2018 Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
How do I code this? (python) Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below the next line, but such values don't actually appear as output when the program runs. Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! Enter another integer: 5 4+5 is 9 4*5 is 20 536024.3979308.qx3zqy7 LAB ACTIVITY 1.20.1: LAB: Warm up: Basic output with variables main.py 1 user_num = int(input('Enter integer: ')) 2 3 int = 4 Develop mode Submit mode Run your program as often as you'd like, before submitting for grading input values in the first box, then click Run program and observe the pr
Close icon
Play audio
Feedback
Powered by NumerAI
Ivan Kochetkov Kathleen Carty
Danielle Fairburn verified

Liam Haas-Neill and 77 other subject AP CS educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
hello-i-need-help-for-this-python-3-warmup-question114-warm-up-basic-output-with-variables-python-3infothis-section-has-been-set-as-optional-by-your-instructorthis-zylab-activity-is-intended-33753

1.14 Warm-up: Basic output with variables (Python 3) A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated. (1) Output the user's input. Enter integer: 4 You entered: 4 (2) Extend to output the input squared and cubed. Hint: Compute squared as userNum * userNum. Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! (3) Extend to get a second user input into userNum2. Output the sum and product. Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!! Enter another integer: 5 4 + 5 is 9 4 * 5 is 20

Liam H.

write-code-that-outputs-variable-numrooms-end-with-a-newline-our-tests-will-run-your-program-with-input-2-then-run-again-with-input-5-your-program-should-work-for-any-input-though-numrooms-i-36634

Write code that outputs variable numRooms. End with a newline. ''' Our tests will run your program with input 2, then run again with input 5. Your program should work for any input, though. ''' numRooms = input() Note: Python

Akash M.

how-to-use-input-to-prompt-a-user-in-python-61443

How to use input to prompt a user in python

Haricharan G.


*

Recommended Textbooks

-
Computer Science and Information Technology

Computer Science and Information Technology

Trishna Knowledge Systems 2018 Edition
achievement 1,236 solutions
Introduction to Programming Using Python

Introduction to Programming Using Python

Y. Daniel Liang 1st Edition
achievement 1,034 solutions
Computer Science - An Overview

Computer Science - An Overview

Glenn Brookshear, Dennis Brylow 12th Edition
achievement 1,343 solutions

*

Transcript

-
00:01 Okay, this question says, variable like username can store a value like an integer.
00:08 Extend the given program to print username values as indicated.
00:15 Output the user's input, enter integer, you entered for two.
00:27 Extend to output the input squared and cubed.
00:31 There's a hint here.
00:38 This is just an extension here.
00:41 Next is send to get a second user input.
00:49 I'll put summon product.
00:52 That's easy enough.
00:57 Okay...
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever