Question
Now suggest a change to just one line of that answer that would cause it to only display the powers of 3 up to 100
Now suggest a change to just one line of that answer that would cause it to only display the powers of 3 up to 100 (without using the ** operator) The displayed values would include 1, 3, 9, 27 ,,,
my answer: change "counter=counter=1" to "counter=counter*2 "
My question: Now let us modify that previous problem. Instead of displaying all the powers of 3 less than 100, display the first value of 3 that is greater than 100.
Do that without changing the while loop condition or any assignment statements or without adding any new variables or calculations.
Hint: Only one answer is to be displayed -- and that answer should be 243.
What change did you make?
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