Computer Science, asked by kerimovacinare2407, 1 month ago

program positive integer n is given. Remove from this number all digits 3 and 9, leaving the order of other digits the same.how can I write a phyton program for this problem ​

Answers

Answered by allysia
1

Answer:

It goes like:

\\\tt a=int(inp ut("Enter\ a\ number: "))\\\tt b=str(a)\\\tt new=""\\\tt for\ i\ in\ b:\\\tt {\qquad   if\ i=="3"\ or\ i=="9":} \\\tt {\qquad {\qquad       new+=""}}  \\\tt  {\qquad\  else:} \\\tt  {\qquad {\qquad      new+=i}} \\\tt new\_num = str(new)\\\tt print(new\_num)

Similar questions