Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions

Question

Analyze the impact of labor unions on health care.

Answered: 1 week ago

Question

Assess three motivational theories as they apply to health care.

Answered: 1 week ago

Question

Discuss the history of U.S. labor unions.

Answered: 1 week ago