[solved] – Question 97769

To create the body of a function, we ____________ the code.

Expert Answer


[solved] – Question 97770

The __________ keyword creates the function.

Expert Answer


[solved] – Question 97771

Functions go _____________ the main program in the source code file.

Expert Answer


[solved] – Question 97779

Write a program that uses two input statements to get two words as input. Then, print the words on one line separated by a space.

Expert Answer


[solved] – Question 97812

How to print a name… mancile.. Using star pattern in java

Expert Answer


[solved] – Question 97822

You decide to go for a very long drive on a very straight road. Along this road are five cities. As you travel, you record the distance between each pair of consecutive cities. You would like to calculate a distance table that indicates the distance between any two of the cities you have encountered. Write a Python program, including comments, that will ask user for a string of integers separated by comma. You program must display a 5 by 5 array of numbers representing the distance between cities.

Expert Answer


[solved] – Question 97824

Prachi plants N different sunflowers, each with a unique height, ordered from smallest to largest, and records their heights for N consecutive days. Each day, all of her flowers grow taller than they were the day before. She records each of these measurements in a table, with 1 row for each plant, with the first row recording the shortest sunflower’s growth and the last row recording the tallest sunflower’s growth. The leftmost column is the first measurement for each sunflower, and the rightmost column is the last measurement for each sunflower. If a sunflower was smaller than another when initially planted, it remains smaller for every measurement. Unfortunately, her children may have altered her measurements by rotating her table by a multiple of 90 degrees. Your job is to help Prachi determine her original data.
Write a Python program, including comments, that will ask the user for a list of N by N of numbers where N is at most 10. Your program must display the unrotated original list

Expert Answer


[solved] – Question 9784

Write a program to assign seats on each flight of the
airline’s only plane (capacity: 50 seats (10 rows (A-J) of 5 seats each)). The program
should display the following menu of alternatives: Please type 1 for “First class” and
Please type 2 for “Economy”. If the person types 1 your program should ask for the
person’s name and assign a seat in the first class section (rows 1-3 (15 seats)). If the
person types 2, the program should ask for the person’s name and assign a seat in
economy section (rows 4-10 (35 seats)). Menu Option 3 displays the seating
allocation. The program should print a boarding pass indicating the person’s name
and seat number and weather it is in the first class or economy section of the plane
along with the price (R10 000 for first class and R5 000 for economy). Isle seats (A-J
seat number 2 and 3 are subject to a 10% discount) Use a 2-Dimensional array to
represent the seating chart of the plane. Initialize all the elements of the array to 0 to
indicate that all seats are empty. As each seat is assigned, set the corresponding
elements of the array to X to indicate that the seat is no longer available. When the
first class section is full, the program should ask the person if it is acceptable to be
placed in the economy section (and vice versa). If yes then make the appropriate
seat assignment. All seats in each section are assigned randomly unless the person
flying stipulates a specific seat. In the display view, show the percentage occupied of
the total flight (seats taken vs seats available) else if no seats are available then print
the message “Next Flight leaves in 3 hours.” All flight information must be saved to a
file.

Expert Answer


[solved] – Question 97863

At the start of each year, a list of units offered by a university is provided its students.
The students check the units available, and enrol in the units that are part of their degrees.

The timetable of classes for each unit is provided by the Class Management office.
Each unit has a few available classes that run at different days during the week.
Students check the class schedule and register for a class of their choice. They get a
confirmation after they have registered for their classes.

The academic staff members coordinating units check the class registrations during class
registration week. They inform the Class Management office to open or close classes if
needed. They also get a list of students registered in each of their classes once registrations
are closed. They also get a list of students enrolled in each of their units at census date.

Expert Answer


[solved] – Question 97864

Source: (https://elpais.com/tecnologia/2019/07/17/actualidad/1563371290_289881.html)
a. What are the benefits of a smart city? Considering the dark side of smart city are you
sceptical to the benefits of a smart city.
b. What are the potential cybersecurity challenges faced in a smart city with data being
collected in this way?

Expert Answer