Answer:
Explanation:
TCP Transmission Control Protocol, is an internet protocol to exchange data, is one of the most main protocols of the internet is used from the beginning, with UPD is used to transfer data too, but is less secure than TCP, but is faster than TCP, in this case, UDP is used to transfer music or videos, and TCP is used to transfer websites and database.
Answer:
The program to this question can be defined as follows:
Program:
num=int(input("Enter any number: ")) #defining variable num, that take value from user
val=0; #defining variable val
for i in range(num): #defining loop to calculate value in decreasing order
val=num-i; #holding value in variable
print(val) #print value
Output:
Enter any number: 3
3
2
1
Explanation:
In the above-given code, a variable "num" is declared, that uses input function to take value from the user end, in the next line a "val" variable is defined, that calculates values and print it in decreasing order.
- In the next step, a for loop is declared, inside the loop a "val" variable uses num and loop variable "i" to calculate the value in decreasing order.
- In the last print method is used that prints "val" variable value.
Portable car defroster, defogger 12V heater
Lower prices, better phones, more features, etc
The answer is true.
Explanation:
The scanner class's methods are the methods in java.util, which allows the user to read values of various types. If the nextLine is issued after a numeric read and the numeric value is at the end of the line, nextLine returns the empty string.
The problem occurs when you click the enter key which is a new line \n character. nextInt() has only the integer but skips the new line \n.
To solve this problem, you have to add the input.nextLine() after reading the int it will consume the \n.
Hence, make input.nextLine(); call after input.nextint(); which reads till end of life.