Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Hollow Right Triangle - 2

Given an integer number

N as input. Write a program to print the hollow right-angled triangular pattern of N lines as shown below.Note: There is a space after each asterisk (*) character.Input

The first line of input is an integer

N.Explanation

In the given example the hollow right angled triangle of side

5. Therefore, the output should be

*

* *

* *

* *

* * * * *


Sample Input 1

4

Sample Output 1

*

* *

* *

* * * *

Sample Input 2

5

Sample Output 2

*

* *

* *

* *

* * * * *




road accident is the number one killer in USA far exceeding that of HIV aids and COVID-19 put together. Most of the roads accidents are known to have been caused by driver negligence. Max of AiTSystem a software company advised that a system should be put in place to track the number of offenses committed by drivers. The system should be able to count the number of offenses committed by
each driver and make the following recommendations.

a. If a minor offense is committed by a driver, a fine of GHs 50 should be charged and the driver cautioned. A second minor offense by the same driver should
attract a fine of GHs 150 and the bared from driving for two weeks.
If the same driver commits more than two minor offenses, the driver’s license
should be confiscated and directed to go for retraining as a driver.

b. However, if a major offense is committed the driver should be investigated by DVLA.

c. On a trial bases, you are to develop a system to depict “a, and b’ above and
display the results
a. Critically explain why you would consider the concept of using functions in your program again running a couple of if else statements.

b. Declare a function with three arguments all of type int. The function should return the greatest of the three arguments, however if any two or all three are the same, you function should return that value.

c. Embed you function in a complete program that requests for three variable all of type int and display the conditions explained in “b” above.

d. Critically explain the logic behind the code.
The electoral petition of 2021 was aimed at determining the winner of the 2020 election. The
rule is that the winner of an election in Ghana must obtain at least 50% +1 of the valid votes
cast.

a. Explain the concept of function in C++

b. Declare a function called Greatest, your function should have five arguments
i. The two names of the presidential candidates with the most votes
ii. Total number of votes for each of them.
iii. Total valid votes cast.

c. Your function should declare that candidate that had at least 50%+1 of the valid votes
cast as winner.

d. Explain the logic behind the code

Eligibility Criteria - 4


This Program name is Eligibility Criteria - 4. Write a Python program to Eligibility Criteria - 4, it has two test cases


The below link contains Eligibility Criteria - 4 question, explanation and test cases


https://drive.google.com/file/d/1BXdR9DFZDOCHR0pCuEYhrnK_H98soAWI/view?usp=sharing


We need exact output when the code was run

Eligibility Criteria - 3


This Program name is Eligibility Criteria - 3. Write a Python program to Eligibility Criteria - 2, it has two test cases


The below link contains Eligibility Criteria - 3 question, explanation and test cases


https://drive.google.com/file/d/1yiA-NxCpGk5uTvtilgzcNU0krAKbDIv4/view?usp=sharing


We need exact output when the code was run

Eligibility Criteria - 2


This Program name is Eligibility Criteria - 2. Write a Python program to Eligibility Criteria - 2, it has two test cases


The below link contains Eligibility Criteria - 2 question, explanation and test cases


https://drive.google.com/file/d/1xObf_3zdyEfD8yEtB5V4OqL6HVzEd7h1/view?usp=sharing


We need exact output when the code was run

Eligibility Criteria - 1


This Program name is Eligibility Criteria - 1. Write a Python program to Eligibility Criteria - 1, it has two test cases


The below link contains Eligibility Criteria - 1 question, explanation and test cases


https://drive.google.com/file/d/1Tp20Je-ZL3tEbrjEv-focZR8Rr_0DBNg/view?usp=sharing


We need exact output when the code was run

Masking - 2


This Program name is Masking - 2. Write a Python program to Masking - 2, it has two test cases


The below link contains Masking - 2 question, explanation and test cases


https://drive.google.com/file/d/1B638gu1ZK2GtvqCwmxaQkgaCBFi-qAiz/view?usp=sharing


We need exact output when the code was run

Hollow Right Triangle

Given an integer number

N as input. Write a program to print the hollow right-angled triangular pattern of N lines as shown below.Note: There is a space after each asterisk (*) character.Input

The first line of input is an integer

N.Explanation

In the given example the hollow right angled triangle of side

4. Therefore, the output should be

* * * *

* *

* *

*


Sample Input 1

4

Sample Output 1

* * * *

* *

* *

*

Sample Input 2

6

Sample Output 2

* * * * * *

* *

* *

* *

* *

*




LATEST TUTORIALS
APPROVED BY CLIENTS