Answer:
Following are the code in the python language
if firstInClass.startswith("Pat") and secondInClass.startswith("Wei"): #check the #condition
firstInClass, secondInClass = secondInClass, firstInClass #swap value
Explanation:
Following are the description of statement
- Firstly we check the condition the string start with pat with the string start with the Wei string along with the and operator with them .
- If the condition is true then it executed the block of if statement means executed the statement inside the if block .It means it swap the statement without assigning the value .
Answer:
the correct answer is E
I do all of these so I would assume E
Answer: in C
#include <stdio.h>
int main(){
int num1, num2;
printf("Enter first number :: ");
scanf("%d", &num1);
printf("Enter second number :: ");
scanf("%d", &num2);
if(num1 > num2){
printf("%d is larger than %d\n", num1, num2);
} else if (num2 > num1) {
printf("%d is larger than %d\n", num2, num1);
} else{
printf("Both of them are equal\n");
}
return 0;
}
Answer: <u>EXE files are mainly used to indicate that the file is executable</u>
<u>MSI files show that the file is a Windows Installer</u>
<u />
Explanation:
EXE files are mainly used to indicate that the file is executable
MSI files show that the file is a Windows Installer
<u>MSI files are only used with launchers, EXE does not need to be used with launchers </u>
Hope this helped :)
Answer:
Solution part of the question:
if(userTickets>5) //compare the value of userTickets with 5.
awardPoints = 10; // assign the 10 value to the award point
else
awardPoints=userTickets;// assign the userticket value to the awardpoint.
Output:
For the input 4 the output is 4.
For the input 5 the output is 5.
For the input 6 the output is 10.
For the input 7 the output is 10.
Explanation:
All the other part of the program is given on the question so here only if-else statement is given on the answer part. Which is pasted at the place of "/* Your solution goes here */" and the user can get the right answer.
- In the "if" statement the value of "userTickets" variable is get compared by 5 and if it is greater than 5 than variable "awardpoint" assigns the '10' value.
- Otherwise, with the help of "else" statement "userticket" variables value (which is the input value for the program) assign to the "awardpoint" variable.