Week 8 : Programming Assignment 1
Due on 2023-09-21, 23:59 IST
Write a program which will print a pyramid of "*" 's of height "n" and print the number of "*" 's in the pyramid.
For example:
Input : 5
Output:
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
25
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 3 | * \n
* * * \n
* * * * * \n
9 | * \n
* * * \n
* * * * * \n
9 | Passed after ignoring Presentation Error |
Test Case 2 | 5 | * \n
* * * \n
* * * * * \n
* * * * * * * \n
* * * * * * * * * \n
25 | * \n
* * * \n
* * * * * \n
* * * * * * * \n
* * * * * * * * * \n
25 | Passed after ignoring Presentation Error |
Week 8 : Programming Assignment 2
Due on 2023-09-21, 23:59 IST
Write a program which will print a pascal pyramid of "*" 's of height "l" .
For example:
input: 8
output :
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
* * * * * * * *
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 8 | * \n
* * \n
* * * \n
* * * * \n
* * * * * \n
* * * * * * \n
* * * * * * * \n
* * * * * * * * | * \n
* * \n
* * * \n
* * * * \n
* * * * * \n
* * * * * * \n
* * * * * * * \n
* * * * * * * * \n
| Passed after ignoring Presentation Error |
Test Case 2 | 7 | * \n
* * \n
* * * \n
* * * * \n
* * * * * \n
* * * * * * \n
* * * * * * * | * \n
* * \n
* * * \n
* * * * \n
* * * * * \n
* * * * * * \n
* * * * * * * \n
| Passed after ignoring Presentation Error |
Week 8 : Programming Assignment 3
Due on 2023-09-21, 23:59 IST
Write a program which will print a pyramid of "numbers" 's of height "n" and print the sum of all number's in the pyramid.
For example:
input: 5
output:
1
1 2 3
1 2 3 4 5
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8 9
95
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 5 | 1 \n
1 2 3 \n
1 2 3 4 5 \n
1 2 3 4 5 6 7 \n
1 2 3 4 5 6 7 8 9 \n
95 | 1 \n
1 2 3 \n
1 2 3 4 5 \n
1 2 3 4 5 6 7 \n
1 2 3 4 5 6 7 8 9 \n
95\n
| Passed after ignoring Presentation Error |
Test Case 2 | 3 | 1 \n
1 2 3 \n
1 2 3 4 5 \n
22 | 1 \n
1 2 3 \n
1 2 3 4 5 \n
22\n
| Passed after ignoring Presentation Error |
Week 8 : Programming Assignment 4
Due on 2023-09-21, 23:59 IST
Write a program to print symmetric Pascal's triangle of "*" 's of height "l" of odd length . If input "l" is even then your program will print "Invalid line number".
For example:
input : 5
output:
*
* *
* * *
* *
*
input : 6
output:
Invalid line number
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 6 | Invalid line number | Invalid line number | Passed |
Test Case 2 | 7 | * \n
* * \n
* * * \n
* * * * \n
* * *\n
* *\n
* | * \n
* * \n
* * * \n
* * * * \n
* * *\n
* *\n
*\n
| Passed after ignoring Presentation Error |
Week 8 : Programming Assignment 5
Due on 2023-09-21, 23:59 IST
Write a program to display any digit(n) from 0-9 represented as a "7 segment display".
For example:
input : 5
output :
_
|_
_|
input : 4
output :
|_|
|
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 5 | _ \n
|_ \n
_| | _ \n
|_ \n
_|\n
| Passed after ignoring Presentation Error |
Test Case 2 | 4 | |_|\n
| | \n
|_|\n
|\n
| Passed after ignoring Presentation Error |
No comments