Answer:
Following are the code to this question:
For point a:
value=7#defining a variable value that holds an integer value
if(value>0 and value<10):#use if block with and operator to check the value
print("did it")#print message
For point b:
my_str="not_password"#defining a variable my_str that holds string value
if (len(my_str) > 0):#defining if block that checks string variable length is greater than 0
if (my_str!= "password"):#defining if block to check my_str is not equal to another given value
print("did it")#print message
For point c:
my_str="not_password"#defining a variable my_str that holds string value
if (len(my_str) > 0):#defining if block that checks string variable length is greater than 0
print("did it")#print message
elif (my_str!="password"):#use elif block to check my_str is not equal to another given value
print("did it")#print message
Output:
did it
did it
did it
Explanation:
Please find the complete and the correct question in the attached file.
In point a, the "value" variable is defined, that holds an integer value , and it uses if block with "and" operator to check the value is greater than 0 and less than 10, and at the last, it will print the message "did it".
In point b, the "my_str" variable is declared, that holds a string value , and use the multiple if block in this, it checks the length is greater than 0, and in another, if it checks its "my_str" value is not equal to another given value, and it prints the message "did it".
In point c, the "my_str" variable is declared, that holds a string value , and use the if block, it checks the length is greater than 0, it will print the message "did it". In the elif block, it checks "my_str" value is not equal to another given value, and it prints the message "did it".