Answer:
myvalue = input("please input your value: ")
while len(myvalue) < 10 :
myvalue = input("please input your value: ")
if len(myvalue) >= 10:
break
if len(myvalue)%2 == 0:
print(myvalue.lower())
else:
print(myvalue.upper())
Explanation:
Create a python program file and name the file as loops1.py in accordance to what the question stated. Note to run this file you must have installed python software on your system.
Interpreting the code,
myvalue = input("please input your value: ") simply prompt the user to input a value .
while len(myvalue) < 10 : and myvalue = input("please input your value: ") This is a while loop that prompts the user to input another values if the initial value length inputted is less than 10.
if len(myvalue) >= 10: If the length of the value is equal or greater than 10 then the break statement terminates the while loop entirely.
if len(myvalue)%2 == 0: If the length of the value inputted divided by 2 is equal to 0, the lower case version(print(myvalue.lower())) of the value is printed out.
else:
The uppercase value is printed( print(myvalue.upper()))
NOTE python use indentation.