Question: i keep trying this python code and it continues to say its incorrect Write code that examines a string stored in a variable called product_id

 i keep trying this python code and it continues to sayi keep trying this python code and it continues to say its incorrect

Write code that examines a string stored in a variable called product_id and prints an appropriate version of the id. If the id is composed of only numeric digits, print it as is. If it is composed of a combination of alphabetic letters and digits, print the id with all alphabetic letters in uppercase. Otherwise (if there are any other type of characters in the id), print it with all alphabetic letters in lowercase. Assume that the product_id has already been initialized. 1 product_id = "AR123ab" 2 allDigits - product_id.isdigit() 3 if (allDigits): I print (product id) 5 else: alphaNdigits - True for 1 in product_id: Check My Solution Load My Latest Solution Reset Test Results: * The output is not correct when the id is '12345'. The output is not correct when the id is 'qx9876b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!