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
docker41 [41]
3 years ago
10

Find every number from 1 to n (inclusive) that is a palindrome which starts with the digit 3. Do not user a helper function.

Computers and Technology
1 answer:
Mkey [24]3 years ago
7 0

Answer: Following code is in python

n=input()

num='1'

while int(num)<=int(n):    //loop from 1 to n

   flag=1   //if an unequal element will be found it will be 0

   l=len(num)

   if num[0]=='3':

       j=0

       k=l-1

       while j<k:    //loop till middle of number

           if num[j]==num[k]:

               j+=1     //from beginning

               k-=1    //from end

           else:

               flag=0

               break

       if flag==1:

           print(int(num))

   num=str(int(num)+1)    //number will be incremented as integer

INPUT :

1000

OUTPUT :

3

33

303

313

323

333

343

353

363

373

383

393

Explanation:

In the above code, a loop is executed till num is equal to n which is entered by the user. num is treated as a string so that to ease the process of checking first character is 3 or not. If it is 3 then another loop executes which checks if an element from starting is equal to the corresponding element from the end. If an element is not equal then the flag is changed and then we break out of the loop and prints the number if the flag isn't changed.

You might be interested in
Working with text in presentation programs is similar to using text in other applications
olganol [36]
What are the other applications?
8 0
3 years ago
Read 2 more answers
What is the difference between player-centric game design and designer-centric game design? How does a player-centric game assis
RoseWind [281]

<u>Answer</u>:

<em>A player centric game would be one of the best game where the player would navigate till the end of the game. </em>

<u>Explanation</u>:

It is the game, where the designer considered himself as <em>a player and make the background picture, music, character, challenge </em>everything would be tackled in a fun-filled way.

A <em>designer centric game would be a one, where the player wouldn’t enjoy playing and will never be able to complete the entire game</em> and would have been tired of listening to the background music and other <em>unfriendly aspects in the game.</em>

8 0
3 years ago
A digital designer might do computer animation or video games true or false
pav-90 [236]

your answer should be TRUE if i’m correct..

MARK ME BRAINLIEST PLEASE IF IM CORRECT

3 0
3 years ago
Read 2 more answers
Which code snippet is the correct way to rewrite this in Semantic HTML?
xxMikexx [17]

Answer:

<div id="header">

<h1>Waketech</h1>

</div>

<header><h1>Waketech</h1></header>

Explanation:

I think thats the answer your welcome

8 0
1 year ago
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism
Katyanochek1 [597]

Answer:

B. Paraphrasing plagiarism

Explanation:

<em> Paraphrasing plagiarism:</em>

This is when the sentences or words of the original source of information is being rephrased or stated in your own words.

The type of plagiarism in the student work is a paraphrasing plagiarism because the information in the original source was rephrased by the student using his own sentences and words to express the information in the original material. Also the referenced author was  acknowledge without acknowledging the original author of the material.

8 0
3 years ago
Other questions:
  • What is the difference between operating systems and application software?
    6·2 answers
  • Ruby is creating a presentation. She wants each slide displayed at intervals of five seconds. Which feature in the presentation
    6·2 answers
  • You want to enable nap so that all portal computers using wireless connections have an active firewall. which type of enforcemen
    11·1 answer
  • How did the invention of the printing press lead eventually to an increase in the diversity of religious expression?
    7·1 answer
  • How long does it take to be placed in a class on flvs?
    14·1 answer
  • A business traveler notices there is an extra connector between the keyboard and the computer, in a business center. She has mos
    12·1 answer
  • Henry conducted a survey on an ad done by his company. In the survey, he asked people to evaluate the ad and state whether they
    8·1 answer
  • WILL GIVE BRAINLIEST ANSWER!!!<br><br> How do you manage your screen time?
    8·2 answers
  • When looking at aggregated logs, you are seeing a large percentage of Windows hosts connecting to an Internet Protocol (IP) addr
    5·1 answer
  • Capstone Project part 11 quiz
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!