Answer:
seeexplaination
Explanation:
Code(header file):
#ifndef THROTTLESHIFTLVEL_H
#define THROTTLESHIFTLVEL_H
class throttle
{
int position;
public:
throttle()
{
position = 0;
}
// specify the number of shift levels when creating objects
throttle(int level)
{
position = level;
}
void shut_off()
{
position = 0;
}
void shift(int amount)
{
if(amount >= 0)
position = position + amount;
}
double flow() const
{
return position;
}
bool is_on() const
{
if (position > 0)
return true;
else
false;
}
};
#endif
Please kindly check attachment for screenshot
To draw effectively and accurately in AutoCAD, you must use the object snaps (OSNAP) drafting setting.
That is True
Answer:
"Option 4: ZeroDivisionError" is the correct answer
Explanation:
When we try to divide any number by zero in mathematics, the answer is infinity. Similarly, if we try to divide a number by zero in Python, the Python interpreter throws a "ZeroDivisionError" as the denominator or divisor cannot be a zero.
Hence,
"Option 4: ZeroDivisionError" is the correct answer
Answer:
B
Explanation:
I choose b and it was correct
Answer:
Explanation:
#include <iostream>
using namespace std;
int printroofln(int, int);
int printbodyln(int, int);
int main()
{
int hgt=0,odd=0,rhgt=0;
cout<<"Enter the height:";
cin>>hgt;
if ((hgt%2)==1) rhgt=(hgt/2)+1;
else rhgt=hgt/2;
for (int i=0;i<rhgt;i++)
{
printroofln(i,hgt);
}
for (int j=0;j<hgt;j++)
{
printbodyln(j,hgt);
}
return 0;
}
int printroofln(int rfln, int hgt)
{
int id1,id2,hlf=0;
hlf=hgt/2;
if ((hgt%2)==1)
{
id1=hlf-rfln;
id2=hlf+rfln;
}
else
{
id1=hlf-rfln-1;
id2=hlf+rfln;
}
for (int i=0;i<=hgt;i++)
{
if ((id1==i)||(id2==i))
cout<<"*";
else
cout<<" ";
}
cout<<endl;
return 0;
}
int printbodyln(int bln, int hgt)
{
for (int i=0;i<hgt;i++)
{
if ((bln==0)||(bln==(hgt-1))||(i==0)||(i==(hgt-1)))
{
cout<<"*";
}
else
{
cout<<" ";
}
}
cout<<endl;
return 0;
}