Answer:
Following are the statement which is given below:
if (gpa > 3.5) // check the condition if gpa exceeds 3.5.
{
deansList++; // increment of 1 in the deansList variable
cout << studentName; // display the studentName,
}
Explanation:
The description of the statement
- In the if statement we check the condition of "gpa" .if "gpa" is greater then 3.5 then it executed the statement inside the if block otherwise nothing will be executed.
- if control moves to the if part it adds to 1 to the deansList.
- Finally, display the value of studentName.
What the future beholds!
Trouble with technology? Not a problem!
Techno Gadget
I have more ideas if you're not interested in any of these. :)
Answer:
The Python code is given below
Explanation:
# Get our input from the command line
import sys
N = int(sys.argv[2])
# Convert the list of strings into integers
numbers= []
for i in sys.argv[1].split(","):
if(i.isdigit()):
numbers.append(int(i))
# numbers now contains the list of integers
f = False
#Use for loop upto len(numbers)
for i in range(0,len(numbers)):
#Use "if" loop to check
if numbers[i] == N:
#Assign "True" to "f"
f = True
#Display "i"
print(i)
break
#Check "if" loop by assigning "false" to "f"
if f==False:
#Print "-1"
print("-1")