Answers

Answer 1

with what?

----------------------------------------------------

Answer 2

Answer:

Please Add a Picture

Explanation:

We are unable to help you if you do not know how please notify me!


Related Questions

Write a java program named BMI.java(i)print out your name and your pantherID(ii) Ask user to type in his/her weight and height; if an illegal input (such as a letter) is typed by the user, give the user one more chance to input correctly.(iii)Create a method to compute the body mass index (BMI) accordingly. BMI

Answers

Answer:

Answered below

Explanation:

//Print name and ID

Scanner x = new Scanner(System.in);

System.out.print("Enter name");

String name = x.nextline();

Scanner y = new Scanner(System.in);

System.out.print("Enter ID");

int id = y.nextline();

System.out.println(name, id);

Scanner w = new Scanner(System.in);

System.out.print("enter weight");

double weight = w.nextline();

Scanner h = new Scanner(System.in);

System.out.print("enter height: ");

double height = h.nextline();

int i = 0;

while( I < 2){

if ( !isDigit(weight) && !isDigit(height){

Scanner w = new Scanner(System.in);

System.out.print("enter weight:);

weight = w.nextline();

Scanner h = new Scanner(System.in);

System.out.print("enter height");

height = h.nextline();

}else{

break;

double BMI = weight / ( height **2)

System.out.print(BMI)}

I++

}

Write a lottery program that will ask the user if they would like to pick 5 numbers (1-30) or if they would like to choose EZ Pick where the computer randomly picks their 5 numbers at a cost of $1.00. Then you will give them a chance to also play the Next Chance drawing for an extra $1.00. They do not choose additional numbers for the Next Chance drawing. Once they have all of their selections complete, have the computer game generate the five random winning numbers and if they opted for the Next Chance drawing, select 4 more random numbers. Display all of the users numbers, all of the winning numbers, and display how much, if any, that the player has won based on the following information:

Answers

Answer:

Explanation:

The following code is written in Python and creates arrays for the user's numbers and the next chance numbers, it also creates a cost variable and a did_you_win variable. The function takes in the winning numbers as an array parameter. It asks all the necessary questions to generate data for all the variables and then compares the user's numbers to the winning numbers in order to detect if the user has won. Finally, it prints all the necessary information.

import random

def lottery(winning_numbers):

   user_numbers = []

   next_chance_drawing = []

   cost = 0

   did_you_win = "No"

   #print("Would you like to choose your own 5 numbers? Y or N")

   answer = input("Would you like to choose your own 5 numbers? Y or N: ")

   if answer.capitalize() == "Y":

       for x in range(5):

           user_numbers.append(input("Enter number " + str(x+1) + ": "))

   else:

       for x in range(5):

           user_numbers.append(random.randint(0,31))

           cost += 1

   next_chance = input("Would you like to enter a Next Chance drawing for $1.00? Y or N: ")

   if next_chance.capitalize() == "Y":

       for x in range(4):

           next_chance_drawing.append(random.randint(0, 31))

           cost += 1

           

   if user_numbers == winning_numbers or next_chance_drawing == winning_numbers:

       did_you_win = "Yes"

   print("User Numbers: " + str(user_numbers))

   print("Next Chance Numbers: " + str(next_chance_drawing))

   print("Cost: $" + str(cost))

   print("Did you win: " + did_you_win)

Rules used by a computer network
A network protocol
B hierchary protocal
C procedure

Answers

Answer:

The answer is B hierchary protocal

Answer:

its network protocol

Explanation:

I got it right

(1) Prompt the user for an automobile service. Output the user's input. (1 pt) Ex: Enter desired auto service: Oil change You entered: Oil change (2) Output the price of the requested service. (4 pts) Ex: Enter desired auto service: Oil change You entered: Oil change Cost of oil change: $35 The program should support the following services (all integers): Oil change -- $35 Tire rotation -- $19 Car wash -- $7 If the user enters a service that is not l

Answers

Answer:

In Python:

#1

service = input("Enter desired auto service: ")

print("You entered: "+service)

#2

if service.lower() == "oil change":

   print("Cost of oil change: $35")

elif service.lower() == "car wash":

   print("Cost of car wash: $7")

elif service.lower() == "tire rotation":

   print("Cost of tire rotation: $19")

else:

   print("Invalid Service")

Explanation:

First, we prompt the user for the auto service

service = input("Enter desired auto service: ")

Next, we print the service entered

print("You entered: "+service)

Next, we check if the service entered is available (irrespective of the sentence case used for input). If yes, the cost of the service is printed.

This is achieved using the following if conditions

For Oil Change

if service.lower() == "oil change":

   print("Cost of oil change: $35")

For Car wash

elif service.lower() == "car wash":

   print("Cost of car wash: $7")

For Tire rotation

elif service.lower() == "tire rotation":

   print("Cost of tire rotation: $19")

Any service different from the above three, is invalid

else:

   print("Invalid Service")

Carly’s Catering provides meals for parties and special events. Write a program that prompts the user for the number of guests attending an event and then computes the total price, which is $35 per person. Display the company motto with the border that you created in the CarlysMotto2 class in Chapter 1, and then display the number of guests, price per guest, and total price. Also display a message that indicates true or false depending on whether the job is classified as a large event—an event with 50 or more guests. Save the file as CarlysEventPrice.java.

Answers

Answer:

Answered below

Explanation:

Scanner n = new Scanner(System.in);

System.out.print("Enter number of guests: ");

int numOfGuests = n.nextline();

double pricePerGuest = 35.0;

double totalAmount = numOfGuests * pricePerGuest;

String event = " ";

if ( numOfGuests >= 50){

event = "Large event";

}else{

event = "small event";

}

System.out.print(numOfGuests);

System.out.println(pricePerGuest);

System.out.println( totalAmount);

System.out.println(event);

1.21 LAB: Divide by x

Write a program using integers user_num and x as input, and output user_num divided by x three times.

Answers

Answer:

Explanation:

The following code is written in Python. It is a function called divide_by_x and takes the user inputs as described. It then raises x to the third power and divides user_num by that number. This gives the same result as user_num divided by x three times. The answer is saved in the variable answer which is then returned to the user.

def divide_by_x(user_num, x):

   answer = user_num / (x**3)

   return answer

The program is an illustration of the division arithmetic operation.

The program in Python, where comments are used to explain each line is as follows:

#This gets input for user_num

user_num = int(input())

#This gets input for x

x = int(input())

This loop is repeated three times

for i in range(1,4):

       #This divides user_num by x, each time

       user_num /= x

       #This prints the required output

       print(user_num)

At the end of the program, user_num is divided three times by x and then printed.

Read more about similar programs at:

https://brainly.com/question/17277570

1. What are the 3 main Microsoft Office productivity software programs that is used by millions of people worldwide and will be used to submit your Teacher Graded Assignments in this Computer Literacy course?

Answers

Answer: the top 3 are Microsoft word

                                     Microsoft Excel

                                     Microsoft PowerPoint

Explanation:

Consider a disk that rotates at 3600 rpm. The seek time to move the head between adjacent tracks is 2 ms. There are 32 sectors per track, which are stored in linear order from sector 0 through sector 31. The head sees the sectors in ascending order. Assume the read/write head is positioned at the start of sector 1 on track 8. There is a main memory buffer large enough to hold an entire track. Data is transferred between disk locations by reading from the source track into the main memory buffer and then writing the data from the buffer to the target track. a. How long will it take to transfer sector 1 on track 8 to sector 1 on track 9

Answers

Answer:

19.71 ms

Explanation:

The disk rotates at 3600 rpm, hence the time for one revolution = 60 / 3600 rpm = 16.67 ms.

Hence time to read or write on a sector = time for one revolution / number of sectors per track = 16.67 ms / 32 sectors = 0.52 ms

Head movement time from track 8 to track  9 = seek time = 2 ms

rotation time to head up sector 1 on track 8 to sector 1 on track 9 = 16.67 * 31/32 = 16.15 ms

The total time = sector read time +head movement time + rotational delay + sector write time = 0.52 ms + 2 ms + 16.15 ms + 0.52 ms = 19.19 ms

It will take 19.19 ms to transfer sector 1 on track 8 to sector 1 on track 9

The given parameters are:

[tex]d_r = 3600 rpm[/tex] --- the disk rotation

[tex]s=32[/tex] --- the sectors in a track

Calculate the time (t) to complete one revolution

[tex]t = \frac{60}{d_r}[/tex]

[tex]t = \frac{60}{3600}[/tex]

[tex]t = \frac{1}{6}[/tex]

So, the time to read/write to a sector is:

[tex]T = \frac{t}{s}[/tex]

This gives

[tex]T = \frac{1/6}{32}[/tex]

[tex]T = \frac{1}{192}[/tex]

Convert to ms

[tex]T = \frac{100}{192}[/tex]

[tex]T = 0.52ms[/tex]

Next, calculate the rotation time to head up sector 1 on track 8 to sector 1 on track 9

This is calculated as:

[tex]r_t = t \times \frac{s-1}{s}[/tex]

So, we have:

[tex]r_t = \frac 16 \times \frac{32-1}{32}[/tex]

[tex]r_t = \frac 16 \times \frac{31}{32}[/tex]

[tex]r_t = 0.1615[/tex]

Convert to ms

[tex]r_t = 0.1615 \times 100[/tex]

[tex]r_t = 16.15[/tex]

So, the required time to transfer sectors is:

Time = 2 * Time to read/write to a sector + Seek time + Rotation time

This gives

[tex]Time = 2 \times 0.52 + 2 + 16.15[/tex]

[tex]Time = 19.19[/tex]

Hence, it will take 19.19 ms to transfer sector 1 on track 8 to sector 1 on track 9

Read more about disk rotation at:

https://brainly.com/question/8139268

differentiate between computer and computer system​

Answers

A computer is a programmable device that can automatically perform a sequence of calculations or other operations on data once programmed for the task. It can store, retrieve, and process data according to internal instructions. A computer may be either digital, analog, or hybrid, although most in operation today are digital. Digital computers express variables as numbers, usually in the binary system. They are used for general purposes, whereas analog computers are built for specific tasks, typically scientific or technical. The term "computer" is usually synonymous with digital computer, and computers for business are exclusively digital.

The core, computing part of a computer is its central processing unit ( CPU), or processor. ... A computer system, therefore, is a computer combined with peripheral equipment and software so that it can perform desired functions.

Give brainliest please:)

Design a program that generates a seven-digit lottery number. The program should generate seven random numbers, each in the range of 0 through 9, and assign each number to a list element. (Random numbers were discussed in Chapter 5 (Links to an external site.).) Then write another loop that displays the contents of the list

Answers

Answer:

In Python:

import random

lotterylist = []

for number in range(7):

   lotterylist.append(random.randint(0,9))

   

for number in lotterylist:

   print(number, end = ', ')

Explanation:

This line imports the random library

import random

This line creates an empty list

lotterylist = []

The instructions in this loop will be performed 7 times

for number in range(7):

This line generates a random number between 0 and 9 (inclusive) and then appends the number into lotterylist

   lotterylist.append(random.randint(0,9))

This iterates through lotterylist    

for number in lotterylist:

This prints the content of the list on a line (seperated by comma)

   print(number, end = ', ')

What is the output of the following code snippet? int s1 = 20; if (s1 <= 20) { System.out.print("1"); } if (s1 <= 40) { System.out.print("2"); } if (s1 <= 20) { System.out.print("3"); }

Answers

Answer:

The program outputs 123

Explanation:

The first line of the program initializes s1 to 20

The second line checks if s1 is less than or equal to 20.

This is true,

So, 1 is printed

The third line checks if s1 is less than or equal to 40.

This is true,

So, 2 is printed

The fourth line checks if s1 is less than or equal to 20.

This is true,

So, 3 is printed

Hence, the output is 123

Assume hosts A and B are each connected to a switch Svia 100-Mbps links. The propagation delay on each link is 25μs. The switch Sis a store-and-forward device and it requires a delay of 35μs to process a packet after is has received the last bit in the packet. Calculate the total time required to transmit 40,000 bits from Ato B in the following scenarios. (The total time is measured from the start of the transmission of the first bit at A, until the last bit is received at B. We always assume that links are bi-directional with the same transmission rate and propagation delay in each direction unless specifically instructed otherwise.)

Answers

Answer:

885 μs

Explanation:

Given that:

Switch via = 100 Mbps links

The propagation delay for each link = 25μs.

Retransmitting a received packet = 35μs

To determine:

The total time required to transmit 40,000 bits from A to B.

Considering the fact as a single packet:

Transmit Delay / link = size/bandwith

= 4×10⁴ bits / 100 × 10⁶ bits/sec

= 400 μs

The total transmission time = ( 2 × 400 + 2 × 25 + 35) μs

= (800 + 50 + 35) μs

= 885 μs

Write a program to take in a time-of-day on the command-line as 3 integers representing hours, minutes, and seconds, along with a 4th argument of additional seconds. Recompute the time by adding the additional seconds to the time in the first three command-line arguments. Output: - display the original time given on the command-line - display the newly computed time Example: python computeTime.py 5 59 32 30 Initial time: 5:59:32 Computed time: 6:00:02 {6:0:2 would also be acceptable}

Answers

Answer:

In Python:

hh = int(input("Hour: ")) * 3600

mm = int(input("Minutes: ")) * 60

ss = int(input("Seconds: "))

seconds = int(input("Additional Seconds: "))

time = hh+ mm + ss + seconds

hh =  int(time/3600)

time = time - hh * 3600

mm = int(time/60)

ss = time - mm * 60

while(hh>24):

   hh = hh - 24

print(str(hh)+" : "+str(mm)+" : "+str(ss))

Explanation:

We start by getting the time of the day. This is done using the next three lines

hh = int(input("Hour: ")) * 3600

mm = int(input("Minutes: ")) * 60

ss = int(input("Seconds: "))

Then, we get the additional seconds

seconds = int(input("Additional Seconds: "))

The new time is then calculated (in seconds)

time = hh+ mm + ss + seconds

This line extracts the hours from the calculated time (in seconds)

hh =  int(time/3600)

time = time - hh * 3600

This line extracts the minutes from the calculated time (in seconds)

mm = int(time/60)

This line gets the remaining seconds

ss = time - mm * 60

The following iteration ensures that the hour is less than 24

while(hh>24):

   hh = hh - 24

This prints the calculated time

print(str(hh)+" : "+str(mm)+" : "+str(ss))

Given that the variable named Boy = "Joey" and the variable named Age = 6, create statements that will output the following message:

Congratulations, Joey! Today you are 6 years old.

First, write one statement that will use a variable named Message to store the message. (You will need to concatenate all of the strings and variables together into the one variable named Message. If you don't know what that means, read the section in Chapter 1 about concatenation.)
Then write a second statement that will simply output the Message variable.

Answers

Answer:

isn't it already showing it if not put text box

Explanation:

A mysql prompt has been opened for you. Using the college database, complete the following tasks (use either a single-line or a multi-line SQL statement): Create a courses table with this definition (try using a multi-line SQL statement): --------- --------------------- ------ ----- --------- ---------------- | Field | Type | Null | Key | Default | Extra | --------- --------------------- ------ ----- --------- ---------------- | id | int(3) unsigned | NO | PRI | NULL | auto_increment | | title | varchar(255) | NO | UNI | NULL | | | credits | tinyint(2) unsigned | NO | | 1 | | --------- --------------------- ------ ----- --------- ---------------- Once you have completed these tasks press the Check It! button to have your solution assessed.

Answers

Answer:

See Explanation

Explanation:

Given

See attachment 1 for proper table definition

To answer this question, one of the basic sql commands (the "create" command) will be used to create the required table, followed by the fields of the table.

I could not submit my answer directly. So, I added two additional attachments which represent the answer section and the explanation section, respectively.

You are a computer consultant called in to a manufacturing plant. The plant engineer needs a system to control their assembly line that includes robotic arms and conveyors. Many sensors are used and precise timing is required to manufacture the product. Of the following choices, which OS would you recommend to be used on the computing system that controls the assembly line and why

Answers

Answer:

Linux operating system is suitable for the operation of the automated system because it is more secure with a free open-source codebase to acquire and create new applications on the platform.

Explanation:

Linux operating system is open-source software for managing the applications and network functionalities of a computer system and its networks. It has a general public license and its code is available to users to upgrade and share with other users.

The OS allows user to configure their system however they chose to and provides a sense of security based on user privacy.

Write a program that reads in the text file attached, converts all words to lowercase, and prints out all words in the file that begin with that key letter a, the letter b, and so on. Build a dictionary whose keys are the lowercase letters, and whose values are sets of words which begin with that key letter. After processing the data, print the dictionary to the screen in alphabetical order aligned in two fixed sized columns. Such as:

Answers

Answer:

Follows are the code to this question:

def dic_sorted(data):#defining a method print_dic_sorted

   s = data.split()#defining a variable that use split method

   d = {} #defining a dictionary

   alpha = '0123456789abcdefghijklmnopqrstuvwxyz' #defining a variable alpha that hold english alphabets values

 for k in alpha:#defining for loop that stores values in the dictionary

       d[k]= set()# use dictionary to set value in list

   for i in s:# defining for loop to convert value in lower case

       i = i.lower()  #convert value into lower case by using lower method  

       a = i[0]# adding value into dictionary

       d[a].add(i) # use add method to hold value in dictionary

   for k,v in sorted(d.items()):#use for loop to convert value in assending order

       if len(d[k])!=0: #use if block to check length of dictionary  

           print(k,":", sorted(v))#use print to sort value            

f_name = 'input.txt'#defining a variable that open file  

with open(f_name) as fi:#use open method to read file

   data = fi.read()    # read file data

   dic_sorted(data)#calling method  

output:

please find the attached file.

Explanation:

In the code, the "dic_sorted" method is used, which accepts a data variable as a parameter, and inside the method, a split method and an empty dictionary are defined, that converts and holds the value by alphabetical order, for this it defines three for loops.

In the first for loop, it holds a value in the dictionary, and in the second loop it converts a value into the lower case, and in the third loop, it stores the value in its alphabetical order.

If an excel column will contain prices of smartphones, which number format should you uss

Answers

Answer:

You can use number formats to change the appearance of numbers, including dates and times, without changing the actual number. The number format does not affect the cell value that Excel uses to perform calculations. The actual value is displayed in the formula bar. Excel provides several built-in number formats.

Explanation:

Write a program that prompts the user to enter a fraction in the following format (x/y). You may assume that the user will input numbers and a slash, but your program should deal with spaces. Use String methods to parse out the numerator and denominator (e.g. indexOf(), trim(), substring() etc.) Once you have the numerator and denominator, your program will determine whether the number is a proper fraction or an improper fraction. If it is a proper fraction, display the number. If not, reduce it to a mixed fraction or to an integer (see sample output below).

Answers

Answer:

fraction = input("enter fraction x/y: ")

if len(fraction) == 3:

   if fraction[1] == "/":

       try:

           num = int(fraction[0])

           den = int(fraction[2])

           if num < den:

               print(f"{num}/{den} is a proper fraction")

           else:

               if num% den == 0

                   print(f"{num}/{den} is an improper fraction and can be reduced to {num/den}")

               else:

                   print(f"{num}/{den} is an improper fraction and can be reduced to {num//den} + {num - (den * (num//den))}/{den}")

       except ValueError:

           print("numerator and denominator must be integer numbers")

Explanation:

The try and except statement of the python program is used to catch value error of the input fraction of values that are not number digits. The program converts the numerator and denominator string values to integers and checks for the larger value of both.

The program prints the fraction as a proper fraction if the numerator is lesser and improper if not.

When importing data using the Get External Data tools on the Data tab, what wizard is automatically
started after selecting the file you want, to help import the data?
Text Import Wizard
Excel Data Wizard
Import Wizard
Text Wrap Wizard

Answers

Answer: text import wizard

Explanation:

Which statement is most likely to be true about a computer network?

Answers

Answer:

the answer is b

Explanation:

hope this helps

Answer:

A network can have several client computers and only one server.

Explanation:

(Confirmed on Edge)

I hope this helped!

Good luck <3

11.4 Simple Arithmetic Program
For this lab, you will write a Java program to prompt the user to enter two integers. Your program will display a series of arithmetic
operations using those two integers.
Sample Output: This is a sample
transcript of what your program should do. Items in bold are user input and should not be put on the
screen by your program. Make sure your output looks EXACTLY like the output below, including spacing. Items in bold are elements input by
the user, not hard-coded into the program.
Enter the first number: 12
Enter the second number: 3
12 + 3 = 15
12 - 3 = 9
12 * 3 = 36
12 / 3 = 4
12% 3 = 0
The average of your two numbers is: 7
A second run of your program with different inputs might look like this:
Enter the first number: -4
Enter the second number: 3
-4 + 3 = -1
-4 3 = -7
-4 * 3 = -12
-4 / 3 = -1
-4 % 3 = -1
The average of your two numbers is: 0
raico 2 of Closedlani That code takes in a single number and


Answers

Answer:

not yet di ko po alam

Explanation:

kasi po wala po ako mhanap na sagot thanks

po

The reason why our computers can get faster without getting bigger is because of...
A. Moore's Law
B. Turing Test
C. The programming system of the ENIAC
D. The popularity of the personal computer

Answers

Almost positive it’s A. Moore’s law

You are creating a mobile version of a community discussion site for busy moms. Users post questions and other topics for discussion. Some days there are as many as 20 new discussion threads. Considering your audience, what might be the best way to lay out navigation elements on the home page

Answers

Answer:

Create a small, collapsible navigation bar at the top of the home page so users can see new topics without scrolling

Explanation:

By so doing the user experience on the website would be improved because, instead of struggling through several pages to read through discussion threads, they can simply click on the navigation bar and pick a discussion topic that interests them.

Consider the following incomplete method, which is intended to return the longest string in the string array words. Assume that the array contains at least one element.

public static String longestWord(String[] words)
{
/* missing declaration and initialization */
for (int k = 1; k < words.length; k++)
{
if (words[k].length() > longest.length())
{
longest = words[k];
}
}
return longest;
}

Which of the following can replace /* missing declaration and initialization */ so that the method will work as intended?

a. int longest = 0;
b. int longest = words[0].length();
c. String longest = "";
d. String longest = words[0];
e. String longest = words[1];

Answers

Answer:

String longest = "";

Explanation:

The initialization that would allow the method to work as intended would be the following

String longest = "";

This is because the method is looping through the array provided as an argument and comparing each word in the array with the word saved inside the variable called longest. The length of both are compared and if the word in the array is longer than the string saved in the variable longest then it is overwritten with the word in the array.

Stacy plans to print her contacts and would like to choose an option that will print select information for each contact in a business card format. Which option should she choose? Small Booklet style Medium Booklet style Memo style Card style

Answers

Answer:

Card style

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users type, format and save text-based documents.

In Microsoft Word 2019, the users are availed with the ability to edit the word document in the following view type;

I. View Mode.

II. Print Mode.

III. Drift Layout.

Generally, end users are able to print a hard copy (physical copy) of the word document they created through the use of a printer.

In this scenario, Stacy plans to print her contacts and would like to choose an option that will print select information for each contact in a business card format. Therefore, the option she should choose is Card style.

The Card style is designed to present informations in a grid-like format or landscape arrangement.

You can expect to see

Answers

Answer:

what?ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

Answer:

D

Explanation:

You can expect to see ________.

A. STOP signs or traffic lights on limited access highways

B. only traffic lights on limited access highways

C. only STOP signs on limited access highways

D. no STOP signs or traffic lights on limited access highways

You do not really know that you have a hand. Here is why. Imagine the possibility in which you are only a handless brain floating in a vat, wired to a super computer that sends to your brain signals that perfectly simulate ordinary sensory experiences. Now, if you really know that you have a hand, you must be in a position to know that you are not such a handless brain in a vat. But are you in a position to know that

Answers

Answer:

If you do not know you are a brain in a vat, you do not have hands.

Explanation:

This premise is plausible as to understand the handless brain which is floating in a vat. The brain is connected to a super computer and it transmits messages to the brain. The brain receives those message and give signals to perform tasks.

Consider the following code segment. int[][] arr = {{3, 2, 1}, {4, 3, 5}}; for (int row = 0; row < arr.length; row++) { for (int col = 0; col < arr[row].length; col++) { if (col > 0) { if (arr[row][col] >= arr[row][col - 1]) { System.out.println("Condition one"); } } if (arr[row][col] % 2 == 0) { System.out.println("Condition two"); } } } As a result of executing the code segment, how many times are "Condition one" and "Condition two" printed?

Answers

Answer:

Condition one - 1 time

Condition two - 2 times

Explanation:

Given

The above code segment

Required

Determine the number of times each print statement is executed

For condition one:

The if condition required to print the statement is:  if (arr[row][col] >= arr[row][col - 1])

For the given data array, this condition is true only once, when

[tex]row = 1[/tex]  and  [tex]col = 2[/tex]

i.e.

if(arr[row][col] >= arr[row][col - 1])

=> arr[1][2] >= arr[1][2 - 1]

=> arr[1][2] >= arr[1][1]

=> 5 >= 3 ---- True

The statement is false for other elements of the array

Hence, Condition one is printed once

For condition two:

The if condition required to print the statement is:  if (arr[row][col] % 2 == 0)

The condition checks if the array element is divisible by 2.

For the given data array, this condition is true only two times, when

[tex]row = 0[/tex]  and  [tex]col = 1[/tex]

[tex]row = 1[/tex]  and  [tex]col = 0[/tex]

i.e.

if (arr[row][col] % 2 == 0)

When [tex]row = 0[/tex]  and  [tex]col = 1[/tex]

=>arr[0][1] % 2 == 0

=>2 % 2 == 0 --- True

When [tex]row = 1[/tex]  and  [tex]col = 0[/tex]

=>arr[1][0] % 2 == 0

=> 4 % 2 == 0 --- True

The statement is false for other elements of the array

Hence, Condition two is printed twice

python program A year with 366 days is called a leap year. Leap years are necessary to keep the calendar in sync with the sun, because the earth revolves around the sun once very 365.25 days. As a result, years that are divisible by 4, like 1996, are leap years. However, years that are divisible by 100, like 1900, are not leap years. But years that are divisible by 400, like 2000, are leap years. Write a program named leap_year.py that asks the user for a year and computes whether that year is a leap year

Answers

Answer:

In Python:

year = int(input("Year: "))

if (year % 4) == 0:

  if (year % 100) == 0:

      if (year % 400) == 0:

          print("Leap year")

      else:

          print("Not a leap year")

  else:

      print("Leap year")

else:

  print("Not a leap year")

Explanation:

This line prompts user for year

year = int(input("Year: "))

This condition checks if input year is divisible by 4

if (year % 4) == 0:

If yes, this condition checks if input year is divisible by 100

  if (year % 100) == 0:

If yes, this condition checks if input year is divisible by 400

      if (year % 400) == 0:

If divisible by 4, 100 and 400, then it is a leap year

          print("Leap year")

      else:

If divisible by 4 and 100 but not 400, then it is not a leap year

          print("Not a leap year")

  else:

If divisible by 4 but not 100, then it is a leap year

      print("Leap year")

else:

If it is not divisible by, then it is not a leap year

  print("Not a leap year")

Other Questions
The length of the hypotenuse of a right triangleis 10 cm and the length of one leg is 5 cm. What isthe length of the other leg? Please I need help anything sentences?? please where are the senteces?? Qu es la conjugacin del verbo? Explica qu es lo que se le hace al verbo? Take a moment to practice identifying a single, researchable question for the following issues:a. A company ships its widgets to a customer on December 31 but has not yet collected payment from the customer. The customer has promised to pay within 30 days but has never purchased good with this company before. Researchable question?b. A customer is suing the local grocery store for a slip-and-fall incident. The grocery store believes the lawsuit will likely be considered frivolous and rejected by the court. The grocery store must decide whether to record or disclose this matter. Researchable question? A new mother keeps track of the time when her baby wakes up each morning What is the level of measurement of the data? PLS HELP at a summer camp there are 876 girls and 25 boy how many more girls are there then boys Please select the word from the list that best fits the definition Asking for review material for a test Which of the following is correct, regarding Junior's dog? Verbally describe what each ordered pair in the first row of your table (when s = 10) means in terms of the situation. Use complete sentences in your answer. Simplify.91-^ + 6-^ SpongeBob and his pal Patrick love to go jellyfishing at Jellyfish Fields! The fields are home to a special type of green jellyfish known as Goobers and only really great jellyfishermen are lucky enough to catch some on every trip. Many of the jellyfish are yellow (BB) or blue (bb), but some end up green as a result of incomplete dominance. What would happen if SpongeBob and Patrick crossed two "goobers or green jellyfish? Complete the Punnett square to help you determine the probability for each color of jellyfish. What percentage would be "goobers" (green)? 0% 25% 50% 100% PLEASE HELP!!! WILL MARK BRAINLIEST!!!Name each transformation correctly as a Translation, Dilation, or Reflection.WILL MARK BRAINLIEST IF CORRECT!!!!!! Find an equation for y in terms of x By definition, the determinant equals ad - bc. What is the value of when x = -2 and y = 3? I NEED HELP PLEASE A certain compact disc (CD) contains 783.216 megabytes of digital information. Each byte consists of exactly 8 bits. When played, a CD player reads the CD's information at a constant rate of 1.5 megabits per second. How many minutes does it take the player to read the entire CD? Express your answer using two significant figures I really don't understand this Read this passage from The Jungle Book."The Wolves are a free people," said Father Wolf. "They take orders from the Head of the Pack, and not from any striped cattle-killer. The man's cub is oursto kill if we choose.""Ye choose and ye do not choose! What talk is this of choosing? By the Bull that I killed, am I to stand nosing into your dog's den for my fair dues? It is I, Shere Khan, who speak!"How is Father Wolf affected by the Law of the Jungle in this passage? 5. A joint of meat weighs 3.5 kg when frozen. It loses 8% of its weightwhen it is thawed. Find the mass of the joint when thawed. * An ambitious physics major decides to check out the Uncertainty Principle for macroscopic systems. She goes to the top of the UD tower and drops a marble of mass m to the ground, trying to hit one of the cracks between bricks on the mall. To aim her marble, she teeters precariously directly over the desired crack and uses a very sophisticated apparatus of the highest possible precision, which she has borrowed from the General Physics Lab. Alas, try as she might, she cannot hit the crack. Required:Prove that the marble will inevitably miss the crack.