Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python: IF THEN | IF THEN ELSE | ID COMP_OP INT ID ASSIGN INT t_COMP_OP= r'==|!=|>=|
Python:
IF THEN | IF THEN ELSE |
ID COMP_OP INT
ID ASSIGN INT
t_COMP_OP= r'==|!=|>=|<=|<|>'
t_ID= r'[a-z]+'
t_ASSIGN= r'='
Valid syntax?
(1) grade > 70
(2) GRADE = 100
(3) grade = 100
(4) if grade >= 70 then grade = 100
(5) if grade >= 70 then if grade < 80 then grade = 75 else grade = 100
Choices for 5 questions above are
(A) yes
(B) No, it contains a lexical error
(C) No, it contains syntax error
Please explain your pick. Thanks.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started