Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PythonPlease show me the Python code The input() function allows you to accept typed input from a user as a string. For example, X =

PythonPlease show me the Python code

image text in transcribed

The input() function allows you to accept typed input from a user as a string. For example, X = input ("Please input a number.) # user types 7 X # output '7' Write code that prompts a user to input an odd int . If the user inputs an even int , the code should re-prompt them for an odd integer. After the user has entered an odd integer, the code should print a list of all numbers that the user input. The code int("1") will convert strings composed of numerals into integers. You may assume that the user will only input such strings. Hint: Try while and associated tools. Example # your code > Please enter an integer. 6 > Please enter an integer. 8 > Please enter an integer. 4 > Please enter an integer. 9 > [6, 8, 4, 9]

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_2

Step: 3

blur-text-image_3

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago