1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
worty [1.4K]
3 years ago
10

Use a while loop. Compare the digits; do not write a large if-else for all possible same-digit numbers (11, 22, 33, …, 88), as t

hat approach would be cumbersome for larger ranges.
Computers and Technology
1 answer:
pav-90 [236]3 years ago
5 0

Answer:

The solution code is written in Python 3:

  1. num = 11
  2. while(num <=88):
  3.    firstDigit = num // 10
  4.    secondDigit = num % 10
  5.    if(firstDigit == secondDigit):
  6.        print(num)
  7.        
  8.    num += 1

Explanation:

Firstly, create a variable, num, to hold the starting value, 11 (Line 1)

Create a while loop and set the loop condition to continue the loop while num smaller or equal to 88 (Line 3).

Within the loop, we can use // to perform the floor division and get the first digit of the num.  We use modulo operator % to get the second digit of the num. (Line 4 - 5)

If the firstDigit is equal to secondDigit, print the number (Line 7 -8). Lastly, increment the num by one and proceed to next iteration (Line 10).

You might be interested in
What is authentication?
Savatey [412]

Answer:

C

Explanation:

I believe that's the answer if it's not sorry

8 0
3 years ago
Which describes the "Network Effect?
KIM [24]

Answer:

phenomenon

Explanation:

Increased numbers of people or participants improve the value of a good or service.

3 0
3 years ago
Is it possible to have the present value of a future payment that is greater than the future payment (i.e. the present value is
asambeis [7]

Note that the present value always less than the future value and so Is it not possible to have the present value of a future payment that is greater than the future payment.

<h3>Can present value be greater than future cash flows?</h3>

The present value is known to be often less than the future value this is due to the reason that money has interest-earning rate on top of it.

So therefore, that base on the fact that as long as interest rates are positive, then the present value of a sum of money will have to be less than its future value.

Learn more about present value from

brainly.com/question/20813161

6 0
3 years ago
A company that provides finance services wants to shift to a mobile platform. What is the major advantage that the users of the
juin [17]
I think it is b but double check
6 0
3 years ago
Read 2 more answers
Assign listNodes with all elements with a clasa name prog-lang
ra1l [238]

Using the knowledge in computational language in JAVA it is possible to write a code that Assign listNodes with all elements with a clasa name prog-lang

<h3>Writting in JAVA:</h3>

let listNodes;

 //assigning listNodes with all elements with a class name of 'special-language'

  listNodes = document.getElementsByClassName('special-language');

 //for loop to traverse all node in listNodes and print every element in it with class name special-language

 for (let i = 0; i < listNodes.length; i++) {

     console.log(listNodes[i].innerHTML);

 }

See more about JAVA at brainly.com/question/12975450

#SPJ1

8 0
2 years ago
Other questions:
  • Which native windows application allows one to access basic pc settings and controls system info?
    6·2 answers
  • To include totals and other statistics at the bottom of a datasheet, click the ____ button on the HOME tab to include the Total
    12·1 answer
  • An electronic resume is a plain-looking document. True of False?
    6·2 answers
  • Question 1 of 20 :
    15·2 answers
  • What is Napoleon's friend's name? From the Napoleon Dynamite movie.
    14·1 answer
  • Write the definition of a function named newbie that receives no parameters and returns 1 the first time it is invoked (when it
    7·1 answer
  • In open addressing with linear probing we must consider how to encode
    13·1 answer
  • what security threats do you face in your everyday computer usage? list the current security you use on your digital devices wha
    9·1 answer
  • Cheri's teacher asked her to write a program using the input() function. What will this allow her program to do?
    8·2 answers
  • Hurry please I’ll give Brainliest if you are right
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!