A compiler is often used when you want to test your code; that would often be your second step.
#2: Portrait taller than wide & landscape wider than tall
This code attempts to fuse two strings together. So,
fuse("Apple", "Banana")
would return "ABpapnlaen a"
However, there are a couple of things wrong with this code:
- The for loop is incomplete (probably a copy paste error)
- It is unclear from the code if the array jawaban will overflow if kata1 and kata2 are large (it probably will)
- Biggest problem: the jawaban array is declared on the stack, which means it will be cleaned up when the function returns. So the caller of this function will reference unallocated memory! This is a huge bug!!
You explain your situation, they send you a new computer, then mail to them the broken computer and later pay a $200-350 dollar fee. I think it depends on how much damage you made to it.
You can call a Python function like so: function(parameters).
Example:
Define function add:
def add(x,y):
return x+y
Call function:
add(3,7) -> 10