Home / Expert Answers / Computer Science / challenge-3-9-2-conditional-expression-conditional-assignment-activity-using-a-conditional-expres-pa508

(Solved): CHALLENGE 3.9.2 Conditional expression: Conditional assignment. ACTIVITY Using a conditional expres ...




CHALLENGE 3.9.2 Conditional expression: Conditional assignment.
ACTIVITY
Using a conditional expression, write a statement th
Run X Not all tests passed
Testing with inputs: 83
Your output New value is: 9
X Test aborted
Exited with return code 1.
Trac
CHALLENGE 3.9.2 Conditional expression: Conditional assignment. ACTIVITY Using a conditional expression, write a statement that increments num_users if update direction is 3, otherwise decrements num_users. Sample output with inputs: 8:3 New value is: 9 26061 pazz7) 1 num_users - int (input()) 2 update direction int(input()) 1 test passed 4 num_users (num_users + 1) if update direction else (num_user-1) Alle 6 print('New value is:', num _users) m_users) pas Run X Not all tests passed Testing with inputs: 83 Your output New value is: 9 X Test aborted Exited with return code 1. Traceback (most recent call last): File "main.py", line 266, in num users - (num_users+1) if update direction 3 else (num_user 1) NameError: name 'num user' is not defined.


We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe