import random
nums = [x for x in range(50,100) if x%2!=0]
print(random.choice(nums))
We use a list comprehension to create a list of the odd numbers between 50 and 99. Then we randomly choose one of those numbers using the random module.
Answer:
Page up(PgUp) and Page down(PgDn) keys fall under the navigation keys.
Explanation:
Page up(PgUp) and Page down(PgDn) keys fall under the navigation keys.
They include the four Arrow keys, Page Up, Page Down, Home and End keys.
<u>Arrow Keys:</u>
One of four computer keys marked with an up, down, left, or right arrow, used for moving the cursor.
<u>Page Up and Page down:</u>
Page Up and Page Down keys abbreviated as PgUp and PgDn are two keys commonly found on computer keyboards. The two keys are used to scroll up or down in documents.
<u>Home Key:</u>
The Home key is used to return the typing cursor to the beginning of the line on which you are currently typing.
<u>End Key:</u>
The end key is opposite to home key. It is used to return the typing cursor to the end of the line on which you are currently typing....
Answer:
The answer is "Option A"
Explanation:
Following are the complete code to these question:
public class Arr//defining a class-Arr
{
public static void main(String[] args)//main method
{
int [][] numbers={{1, 2, 3},{4,5,6}}; //defining 2D array numbers
for(int[] row : numbers) //use for loop that holds all array value into 1D array
{
for (int n: row)//defining n variable that holds row array values
{
System.out.print (n); //print n variable value
}
}
}
}
The code comment explains its functioning.