Check if the following code is logically correct. If not provide the correct code(a) age=input (" Enter the number") (b) num=int(age) (c) if (num£5): (d) print("The number is less than 5") (e) else: (f) print ("The number is greater than 5")
Answers
Answered by
0
Only option c is not correct write "if(num<5):" on the c option.
Explanation:
- Option c holds the if statement which holds the condition which needs to check that the value of a num variable is less than 5 or not, but it uses '£' symbol for that which is not correct.
- It is because, when the user wants to check for num value that it is less than 5 or not, then he needs to put the '<' symbol like: "if(num<5):".
- If the user writes "if(num<5):" on the option c, then the above code will give the result correctly.
Learn More:
- Python : https://brainly.in/question/14689905
Similar questions