1 user_num int(input()) # Program willL be tested with values: 1, 2, 3, 4. 2. 3 if user_num < e and user_num < 4: print('Num is equal to two') 5 else: print('Num is not| two') 4 7 8. 1 Check Try again < The if statement has to check if user_num is not 2.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.1: Function And Parameter Declarations
Problem 8E: (Numerical) a. Write a C++ program that accepts an integer argument and determines whether the...
icon
Related questions
Question
100%
CHALLENGE ACTIVITY
4.8.1: If-else statement: Fix errors.
 
344614.2153518.qx3zqy7
Jump to level 1
Find and fix the error in the if-else statement.
 
 
1 user_num = int(input())
# Program will be tested with values: 1, 2, 3, 4.
2
3 if user_num < e and user_num < 4:
print('Num is equal to two')
5 else:
print('Num is not| two')
4
7
8.
1
Check
Try again
X The if statement has to check if user_num is not 2.
1. Compare outnut
Transcribed Image Text:1 user_num = int(input()) # Program will be tested with values: 1, 2, 3, 4. 2 3 if user_num < e and user_num < 4: print('Num is equal to two') 5 else: print('Num is not| two') 4 7 8. 1 Check Try again X The if statement has to check if user_num is not 2. 1. Compare outnut
Input 1
Your output
Num is not two
2: Compare output a
Output differs. See highlights below. Special character legend
Input 2
X Your output
Num is not two
Expected output
Num is equal to two
3: Compare output a
Input 3
Your output Num is not two
4: Compare output ^
Input 4
Your output
Num is not two
Transcribed Image Text:Input 1 Your output Num is not two 2: Compare output a Output differs. See highlights below. Special character legend Input 2 X Your output Num is not two Expected output Num is equal to two 3: Compare output a Input 3 Your output Num is not two 4: Compare output ^ Input 4 Your output Num is not two
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage