Question: Write a python program that accepts a positive integer number from user input and makes and prints a new number that has only odd digits

Write a python program that accepts a positive integer number from user input and makes and prints a new number that has only odd digits of the given number with preserving the order. If the given number has no odd digits, the new number is 0. Your program must check if the input is valid or not. Your program should only include contents from decision structures, boolean logic and repetition structures. Your program should also not include any string modifications or exceptions or functions. The following table shows examples of input and output.

Your input:24503

Your output:53

Your input:190673

Your output:1973

Step by Step Solution

3.47 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

heres the Python program you requested python num intinputEnter a number Ask user to input number ne... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!