Answer:
The output is: Your cost is 100
Explanation:
Given
The above code snippet
and
Required
Determine the output of the code
if cost < 70 or cost > 150
The above condition checks if cost is less than 70 or cost is greater than 150
This condition is false because 100 is neither less than 70 nor is it greater than 150
So, the else statement will be executed.
discount = cost
Which means
discount = 100
So, the print instruction will print: Your cost is 100
Answer:
predictable
Explanation:
because it repeat itself all time
Answer:
There are two ways to find the average of a list of numbers in Python. You can divide the sum() by the len() of a list of numbers to find the average. Or, you can find the average of a list using the Python mean() function
Explanation:
Answer:
class studentType: public personType
{
public:
virtual void print() = 0;
virtual void calculateGPA() = 0;
void setID(long id) {
studentId = id;
}
void setCourses(const string c[], int noOfC) {
noOfCourses = noOfC;
for (int i=0; i<noOfCourses; i++) {
courses[i] = c[i];
}
}
void setGrades(const char cG[], int noOfC) {
noOfCourses = noOfC;
for (int i=0; i<noOfCourses; i++) {
coursesGrade[i] = cG[i];
}
}
long getID() {
return studentId;
}
string* getCourses() {
return courses;
}
char* getGrades() {
return coursesGrade;
}
studentType(string fName = "", string lastName = "",
long id = 0, string c[] = NULL, char cG[] = NULL, int noOfC = 0);
private:
long studentId;
string courses[6];
char coursesGrade[6];
int noOfCourses;
};
Explanation:
Code rewritten
Answer: layout, section, number, more options
Explanation:
Just did it on edge 2020