Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create code that creates the appropriate variables required including your value variable as well as your index variable. Write a while statement that will change
Create code that creates the appropriate variables required including your value variable as well as your index variable. Write a while statement that will change your variable to from zero. This needs to be done in increments of You will need to comment what variable is your index, define your conditional statement, and show where you increment index is located. Lastly your code needs to alert the user what the value of your variable is when the while statement has finished.
Your Code Part :
Copy and paste your code here.
Procedure:
Part : marks
Now you will need to create a secondary code that follows the first one. This code will use a for statement to count your variable down from back to zero. You will need to create a secondary variable as your index in the for statement. It is understood you could still use the index from part but create a secondary one to keep the indexes different You should reduce the value of your primary variable by a unit other than You have the freedom to choose this index amount, it just can not be Once the variable has been counted back down to zero, alert the user with the value contained in your initial variable. Remember to check to ensure you do not have an offbyone error for either parts of the code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started