Answer:
Answered below
Explanation:
//Python code
numberOfCasts = 3
j = 0
fishingPoints = 0
sum = 0
while j < numberOfCasts:
dieNum = randint(1 , 6)
if dieNum ==1:
fishingPoints = 2
elif dieNum == 2:
fishingPoints = 4
elif dieNum == 3:
fishingPoints = 6
elif dieNum == 4:
fishingPoints = 8
elif dieNum == 5:
fishingPoints = 10
elif dieNum ==6:
fishingPoints = 12
sum += fishingPoints
j++
if sum > 30:
print ("Great catch")
elif sum > 10 and sum <= 30:
print("Good catch")
else:
print ("Bad day")
Please Fix This For Me
print ("Please enter a number between 1 and 100")
n = input
if = n < 1 and n > 100:
if = (n // 2 == 0):
print (n, "is even")
if = (n // 3 == 0):
print (n, "is odd")
else:
print("You have not entered a number between 1 and 100.")
Answer:
The correction is as follows:
n = int(input("Please [tex]enter\ a[/tex] [tex]number\ between\ 1[/tex] and 100: "))
if n < 1 or n > 100:
print("You [tex]have\ not[/tex] entered a [tex]number\ between\ 1[/tex] and 100.")
elif n % 2 == 0:
print (n, "is even")
else:
print (n, "is odd")
Explanation:
See attachment for explanation
Consider the following method:
public static String joinTogether(int num, String[] arr)
{
String result = "";
for (String x : arr)
{
result = result + x.substring(0, num);
}
return result;
}
The following code appears in another method in the same class:
String[] words = {"dragon", "chicken", "gorilla"};
int number = 4;
System.out.println(joinTogether(number, words));
What is printed when the code above is executed?
a. dragonchickengorilla
b. drachigor
c. dragchicgori
d. dragochickgoril
e. There is an error in the program, it does not run
Answer: b.
Explanation:
True or false you cannot get a computer virus is you instal antivirus
Answer: F
Explanation: There are many ways hackers can get into your computer, and many ways can bypass an antivirus so it is False
How SPARQL 1.1 has advantage over SPARQL 1.0??