Question: This activity will help you understand how variables are used to store values and which types of variables can be used to hold specific value
This activity will help you understand how variables are used to store values and which types of variables can be used to hold specific value types. Please follow the steps below and use System.out.println instead of System.out.print:
Steps:
- Create an int variable with the value 10.
- Print out this variable in a print statement.
- Create a string variable with the sentence "Hello World!"
- Print the string.
- Directly print the value 15 without a variable.
- Directly print the sentence "This is a string" without a variable
Test:
Use the test provided.
Sample output:10Hello World!15This is a string
Step by Step Solution
3.45 Rating (161 Votes )
There are 3 Steps involved in it
Python Create an int variable with the value 10 intvar 10 Print the int variable printintvar ... View full answer
Get step-by-step solutions from verified subject matter experts
