Answer:
yes you should get a 10 bc it not to much and u can still get something cool
Answer:
See explaination for the program code
Explanation:
The Programming code:
inFile = open("stuff.txt", "r")
num = []
Sum = 0
for val in inFile.readlines():
value = val.split(",")
Sum = Sum + int(value[1])
print("Sum of second number on every line in the file is: ", Sum)
inFile.close()
Please kindly check attachment for output
Every program that interacts with people responds to a specific set of commands. The set of commands and the syntax for entering them is called the user interface and varies from one program to another. The DOS operating system makes a distinction between internal and external commands.
Answer:
The code will give an error that is "At least one public class is required in main file".
Explanation:
In the given code if we do not use the public access modifier to the class. It will give an error so, the correct code to this question as follows:
Program:
import java.util.HashSet; //import package
public class A //define class as public.
{
public static void main(String[ ] args) //define main method.
{
HashSet set = new HashSet(); //creating hashset object.
set.add("A"); //add alphabet in hashset
set.add("B"); //add alphabet in hashset
set.add("C"); //add alphabet in hashset
System.out.print("Size of HashSet is :"set.size()); //print the size of hashset.
}
}
Output:
Size of HashSet is : 3
Explanation of the program:
- In the above program, we define a public class that is "A" and inside the class, we define the main method.
- Inside the main method, we create a HashSet class object that is "set".
- To add elements in HashSet we use add() function that adds elements and in the last, we use the size() function that prints the size HashSet.
It's usually in C: drive.
<span>C:\$Recycle.Bin
</span>But if you have several drives, there are Recycle Bins each drive.