We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
Quote:
That's not my homework.
I got it while solving an online quiz code and I couldn't do it.
It is HomeWork because it is complicated only for newbie student, it is aimed to teach you how to combine things.
Advice:
Take a sheet of paper and make a table where you report facts in columns.
- line number
- line number is odd or even
- how many stars on the line
- how many # on the line
- starts on left or right
Make this table for 8 and 9, then look for patterns.
Training exercises:
Ask a number, then draw something:
-Draw a triangle
*
* *
* * *
* * * *
* * * * *
-Add # to make it a square
* # # # #
* * # # #
* * * # #
* * * * #
* * * * *
-Swap left-right
# # # # *
# # # * *
# # * * *
# * * * *
* * * * *
-Draw a pyramid
*
* *
* * *
* *
*
-Add # to make it a square
* # # # #
* * # # #
* * * # #
* * # # #
* # # # #
-Swap left-right
# # # # *
# # # * *
# # * * *
# # # * *
# # # # *
Being a programmer is also being at ease with mathematics
Check the behavior of the absolute function
For x= -2, -1, 0, 1 and 2 :
what is the result of
abs(x)
what is the result of
3-abs(x)
Compare with the other patterns.