True is the right answer.
Answer:
A.
Explanation:
My best guess is this answer. Tell me if I got it wrong, but it sounds right to me.
Answer:
while (Num>=0) {
System.out.println("enter a another number");
Num = in.nextInt();
}
Explanation:
The complete java code prompting a user to enter a number until a negative number is entered is given below:
import java.util.Scanner;
public class num6 {
public static void main (String [] args) {
Scanner in = new Scanner(System.in);
System.out.println("enter a number");
int Num = in.nextInt();
while (Num>=0) {
System.out.println("enter a another number");
Num = in.nextInt();
}
System.out.println("Done.");
return;
}
}
Answer:
def sum_cubes(n):
if n == 1:
return 1
else:
return n * n * n + sum_cubes(n-1)
print(sum_cubes(3))
Explanation:
Create a function called sum_cubes that takes one parameter, n
If n is equal to 1, return 1. Otherwise, calculate the cube of n, and add it to the sum_cubes function with parameter n-1
If we want to calculate the cubes of the first 3 numbers:
sum_cubes(3) = 3*3*3 + sum_cubes(2)
sum_cubes(2) = 2*2*2 + sum_cubes(1)
sum_cubes(1) = 1
If you substitute the values from the bottom, you get 27+8+1 = 36
Answer:
It will either convert the file automatically into the program so you can edit it on the different platform or it will not be able to open the document at all.
Explanation:
I have personally done this before. Usually I use Word documents, which are .doc and .docx files.
I also run a Linux based OS sometimes (dual boot) and I don't have Microsoft Office products on it. However, Linux does have their own set of products that are similar to it.
I opened a .docx file on the Linux version of Word and it did convert the file into a separate one and I was able to edit it.
However, when I then tried opening the new Linux file type on Word, it was not able to open the document at all.
Therefore, it really depends on what programs have what capabilities. Word can open .doc and .docx. Linux could open their own types as well as .doc and .docx by conversion.
A rule of thumb is just not to change the file format at all. Just stick with the original so you don't lose your file. If you cannot do so, then use a online file converter to change the file type.