Answer:
Following are the code to this question:
def Fibonacci(n):#defining a method Fibonacci that accept a parameter
a = 1#defining a variable a that holds a value 1
b = 1#defining a variable b that holds a value 1
if n <= 0:# Use if to check n value
print("invalid number")#print message
elif n == 2:#defining elif that check n equal to 2
return 1#return 1
else:#defining else block
print(a)#print value of a
print(b)#print value of b
for i in range(2,n):#defining for loop to calculate series
s = a + b# add value in s variable
a = b # interchange value
b = s# hold s value
print(s)#print s value
Fibonacci(10)#calling method
Output:
1
1
2
3
5
8
13
21
34
55
Explanation:
In the above-given program code, a method "Fibonacci" is defined, which holds a value "n" in its parameter, and inside the method two-variable "a and b" is defined, that holds a value "1".
- In the next step, if a block is defined that checks n value is less than equal to 0, it will print "invalid number" as a message.
- In the elif, it checks n value is equal to 2 it will return a value that is 1.
- In the else block, it will calculate the Fibonacci series and print its value.
Answer:
public class array{
public static void main(String []args){
int[] array = {2,4,7,1,9};
int num_vals = array.length;
for(int i=0;i<num_vals;i++){
System.out.println(array[i] + " ");
}
for(int i=num_vals-1;i>=0;i--){
System.out.println(array[i] + " ");
}
}
}
Explanation:
First create the class in the java programming.
Then create the main function and declare the array with values.
Store the size of array in num_vals variable by using the function array.length.
create a for loop to iterate the each element in the array and then print on the screen with spaces and newline.
it traverse the loop from first to last.
Then, again create the for loop to iterate the each element in the array and then print on the screen with spaces and newline but the traversing start from last to first.
The answer is DS-30A. The Roland DS30A is a 24-bit Digital Reference Monitor which can add pristine 24-bit/96kHz. They are small speakers.
Answer:
Grace sat quietly in a stinky stadium with her blue jacket
Grace jumped on a plane to Paris.
Grace ate bananas, apples, and guavas quietly while she listened to the news.
Grace is the name of a major character in my favorite novel
Grace was looking so beautiful as she walked to the podium majestically.
Grace looked on angrily at the blue-faced policeman who blocked her way.
Answer:
The rules which could trigger at any period in time are referred to as the conflict set. A programming bug/conflict can occur when two programs compete for the same resource such as memory or register etc.
A Conflict Resolution Strategy is is a protocol which highlights which decision will be triggered first.
The best way to resolve conflict is to first determine the kind of conflict it is. Hardware conflicts can be resolved by first troubleshooting the hardware and in some instances unplugging the hardware causing the conflict.
When hardware creates conflicts it may be due to a driver issue. reverting to an old driver or updating the existing one may solve the problem.
Software conflicts can be resolved by installing updates or complete uninstallation.
Cheers!