Following are the code to this question:
#include <iostream>//defining header file
using namespace std;
bool rightTriangle(int s1,int s2,int s3) //defining method rightTriangle
{
int t1,t2,t3; //defining integer variables
t1 = s1*s1; // multiplying side value and store it into declaring integer variables
t2 = s2*s2; // multiplying side value and store it into declaring integer variables
t3 = s3*s3; // multiplying side value and store it into declaring integer variables
if(t3 == t1+t2)//use if block to check Pythagoras theorem
{
return true; //return true
}
else //else block
{
return false; //return false
}
}
bool equalNums(int n1,int n2,int n3,int n4) //defining method equalNums
{
if(n1==n3 && n2==n4) //defining if block that checks
{
return true;//return value true
}
else //else block
{
return false; //return value false
}
}
int main()//defining main method
{
int t1=3,t2=4,t3=5,t11=3,t12=4,t13=5; //declaring integer varibles and assign value
int check=0; //defining integer varible check that checks values
if(rightTriangle(t1,t2,t3)&&rightTriangle(t11,t12,t13)) //defining codition to check value using and gate
{
if(equalNums(t1,t3,t11,t13) || equalNums(t2,t3,t12,t13)) // defining conditions to check value using or gate
check = 1; //if both conditions are true
}
if(check==1) //if block to check value is equal to 1
{
cout << "Right Congruent Triangles"; //print message
}
else//else block
{
cout << "Not Right Congruent Triangles";//print message
}
}
Output:
Right Congruent Triangles
Explanation:
In the above-given code, a boolean method "rightTriangle" is declared, in which it accepts three integer variable "s1, s2, and s3" as a parameter, inside the method three another variable "t1, t2, and t3" is declared, in which parameter stores its square value. In the next line, a conditional statement is declared that checks the "Pythagoras theorem" value and returns its value. In the next step, another method "equalNums" is declared, that accepts four integer parameter "n1, n2, n3, and n4", inside the method a conditional statement is used that uses an operator to check n1, n3, and n2, n4 value if it is true it will return true value else it will return false. Inside the main method, integer variable and a check variable is defined that uses the if block to passes the value into the method and checks its return value is equal if all the value is true it will print the message "Right Congruent Triangles" else "Not Right Congruent Triangles".Following are the code to this question:
#include <iostream>//defining header file
using namespace std;
bool rightTriangle(int s1,int s2,int s3) //defining method rightTriangle
{
int t1,t2,t3; //defining integer variables
t1 = s1*s1; // multiplying side value and store it into declaring integer variables
t2 = s2*s2; // multiplying side value and store it into declaring integer variables
t3 = s3*s3; // multiplying side value and store it into declaring integer variables
if(t3 == t1+t2)//use if block to check Pythagoras theorem
{
return true; //return true
}
else //else block
{
return false; //return false
}
}
bool equalNums(int n1,int n2,int n3,int n4) //defining method equalNums
{
if(n1==n3 && n2==n4) //defining if block that checks
{
return true;//return value true
}
else //else block
{
return false; //return value false
}
}
int main()//defining main method
{
int t1=3,t2=4,t3=5,t11=3,t12=4,t13=5; //declaring integer varibles and assign value
int check=0; //defining integer varible check that checks values
if(rightTriangle(t1,t2,t3)&&rightTriangle(t11,t12,t13)) //defining codition to check value using and gate
{
if(equalNums(t1,t3,t11,t13) || equalNums(t2,t3,t12,t13)) // defining conditions to check value using or gate
check = 1; //if both conditions are true
}
if(check==1) //if block to check value is equal to 1
{
cout << "Right Congruent Triangles"; //print message
}
else//else block
{
cout << "Not Right Congruent Triangles";//print message
}
}
Output:
Right Congruent Triangles
Explanation:
In the above-given code, a boolean method "rightTriangle" is declared, in which it accepts three integer variable "s1, s2, and s3" as a parameter, inside the method three another variable "t1, t2, and t3" is declared, in which parameter stores its square value. In the next line, a conditional statement is declared that checks the "Pythagoras theorem" value and returns its value. In the next step, another method "equalNums" is declared, that accepts four integer parameter "n1, n2, n3, and n4", inside the method a conditional statement is used that uses an operator to check n1, n3, and n2, n4 value if it is true it will return true value else it will return false. Inside the main method, integer variable and a check variable is defined that uses the if block to passes the value into the method and checks its return value is equal if all the value is true it will print the message "Right Congruent Triangles" else "Not Right Congruent Triangles".See explaination
Explanation:
This function reverses the position
of the consonants keeping the
position of vowel constant.
Parameters:
data : type(str)
The string on which operation
needs to be performed
start : type(int)
Starting index of the string
end : type(int)
Ending index of the string
"""
def consonantReverse(data, start = 0, end = None):
# By default user will psas the data only.
# End will be none which will be set to length of string - 1
if(end == None):
return consonantReverse(data, 0, len(data)-1)
# return as this is invalid
if(start >= end):
return data
# split the data into list
if type(data)== str:
data = list(data)
# initialize index1 and index2
index1 = len(data)
index2 = -1
# find out the first index from beggining
# where consonant is present
for i in range(start, end+1):
if(data[i] not in ['a','e','i','o','u','A','E','I','O','U']):
index1 = i
break
# find out the index from the end
# where consonant is present
for i in range(end, start-1, -1):
if(data[i] not in ['a','e','i','o','u','A','E','I','O','U']):
index2 = i
break
# return as this is not valid case
if(index1 >= index2):
return ''.join(data)
# swap the data in the two index
data[index1], data[index2] = data[index2], data[index1]
# call the function recursively
data = consonantReverse(data, index1+1, index2-1)
# if it is a list, join the list into string
if(type(data) == list):
return ''.join(data)
# otherwise return the data
else:
return data
See explaination
Explanation:
This function reverses the position
of the consonants keeping the
position of vowel constant.
Parameters:
data : type(str)
The string on which operation
needs to be performed
start : type(int)
Starting index of the string
end : type(int)
Ending index of the string
"""
def consonantReverse(data, start = 0, end = None):
# By default user will psas the data only.
# End will be none which will be set to length of string - 1
if(end == None):
return consonantReverse(data, 0, len(data)-1)
# return as this is invalid
if(start >= end):
return data
# split the data into list
if type(data)== str:
data = list(data)
# initialize index1 and index2
index1 = len(data)
index2 = -1
# find out the first index from beggining
# where consonant is present
for i in range(start, end+1):
if(data[i] not in ['a','e','i','o','u','A','E','I','O','U']):
index1 = i
break
# find out the index from the end
# where consonant is present
for i in range(end, start-1, -1):
if(data[i] not in ['a','e','i','o','u','A','E','I','O','U']):
index2 = i
break
# return as this is not valid case
if(index1 >= index2):
return ''.join(data)
# swap the data in the two index
data[index1], data[index2] = data[index2], data[index1]
# call the function recursively
data = consonantReverse(data, index1+1, index2-1)
# if it is a list, join the list into string
if(type(data) == list):
return ''.join(data)
# otherwise return the data
else:
return data
Option D.
Step-by-step explanation:
we know that
The y-intercept is the value of y when the value of x is equal to zero
or
The y-intercept is the value of the function (output) when the value of x=0
In this problem
The output of the function P for x=0 is equal to 5
The output of the function Q for x=0 is equal to 4
therefore
The functions will have different outputs when x=0
Part A
1. Third degree polynomial:
The function can have as many as 3 zeroes only, but it can have 4 intercepts if you include the y-intercept.
2.
Zeroes at: x = -2, x = 1 and x = 2
y-intercept at (0, 4)
End behavior:
3. see attached
Part B
4.
Direction: opens upwards
y-intercept: (0, 10)
zeros: x = 2, x = 5
5. see attached
**unfortunately I am unable to answer any additional questions as has a 5-question rule**
See explanation below.
Step-by-step explanation:
Part A:
(i). They both correct because they could have a third degree polynomial that crosses the x-axis 3 times.
(ii). To find the zero's of the first one, set function equal to zero and use zero factor principle given as:
So, we have:
Option D.
Step-by-step explanation:
we know that
The y-intercept is the value of y when the value of x is equal to zero
or
The y-intercept is the value of the function (output) when the value of x=0
In this problem
The output of the function P for x=0 is equal to 5
The output of the function Q for x=0 is equal to 4
therefore
The functions will have different outputs when x=0
See below.
Step-by-step explanation:
Part A
A 3rd degree polynomial can have no more than 3 x-intercepts or zeros. Kelsey is correct. However, Ray stated it had 4 intercepts which can include 3 x-intercept and 1 y-intercept.
Graph the function g(x) = x3 − x2 − 4x + 4. See attached picture.
It has x-intercepts at (-2,0), (1,0) and (2,0). The y-intercept is (0,4). As x-> -∞ then y -> -∞. As x->∞, y->∞.
Part B
Use the quadratic function f(x) = -x^2 - 6x. The parabola faces downward with y -intercept (-3,9) and zeros (-6,0) and (0,0). See the attached graph.
The axis of symmetry will serve as a ladder through the coaster at x = -3.
Part C and D will need to be using the math above to create the coaster and ad campaign.
See below.
Step-by-step explanation:
Part A
A 3rd degree polynomial can have no more than 3 x-intercepts or zeros. Kelsey is correct. However, Ray stated it had 4 intercepts which can include 3 x-intercept and 1 y-intercept.
Graph the function g(x) = x3 − x2 − 4x + 4. See attached picture.
It has x-intercepts at (-2,0), (1,0) and (2,0). The y-intercept is (0,4). As x-> -∞ then y -> -∞. As x->∞, y->∞.
Part B
Use the quadratic function f(x) = -x^2 - 6x. The parabola faces downward with y -intercept (-3,9) and zeros (-6,0) and (0,0). See the attached graph.
The axis of symmetry will serve as a ladder through the coaster at x = -3.
Part C and D will need to be using the math above to create the coaster and ad campaign.
It will provide an instant answer!