Anybody know how to do 8.1.2 Dory and Marlin on CMU CS Academy?

Answers

Answer 1

In order to represent the walls in each row of the maze, this software first constructs it using a bit array. Dory and Marlin's starting place is slated to (2, 2).

What is Hour of Code at CMU?

The goal of the Hour of Code, a global movement launched by Computer Science Education Week and Code.org, is to teach one hour of computer science and programming to millions of students.

from cs1lib import *

from array import array

# set up maze

maze = array('B', [0x1f, 0x11, 0x1d, 0x11, 0x1f])

# set starting position

x, y = 2, 2

def draw():

   global x, y

       # draw maze

   set_fill_color(0, 0, 1)

   for i in range(5):

       for j in range(5):

           if maze[i] & (1 << j):

               draw_rectangle(j*20, i*20, 20, 20)

   

   # draw Dory and Marlin

   set_fill_color(1, 1, 0)

   draw_circle(x*20+10, y*20+10, 10)

   set_fill_color(1, 0, 0)

   draw_circle((x+1)*20-10, (y+1)*20-10, 10)

      # check if Marlin has reached the end

   if x == 3 and y == 3:

       enable_stroke()

       set_stroke_color(0, 0, 0)

       set_stroke_width(5)

       draw_line(x*20+10, y*20+10, (x+1)*20-10, (y+1)*20-10)

       disable_stroke()

       return

     # check for input

   if has_keyboard_input():

       key = get_keyboard_input()

       if key == "up":

           if y > 0 and not maze[y-1] & (1 << x):

               y -= 1

       elif key == "down":

           if y < 4 and not maze[y+1] & (1 << x):

               y += 1

       elif key == "left":

           if x > 0 and not maze[y] & (1 << x-1):

               x -= 1

       elif key == "right":

           if x < 4 and not maze[y] & (1 << x):

               x += 1

start_graphics(draw, width=100, height=100)

To know more about software visit:-

https://brainly.com/question/1022352

#SPJ1


Related Questions

Consider distributing a file of F=15 Gbits to N peers. The server has an upload rate of us=25 Mbps, and each peer has a download rate of di= 5 Mbps and an upload rate of u. For N= 500 and u=12 Mbps, what is the minimum distribution time for N and u for both client-server distribution and P2P distribution

Answers

The minimum distributiοn time fοr P2P distributiοn is 2,545 secοnds, which is much faster than client-server distributiοn.

What is the shοrtest distributiοn time fοr N and u fοr bοth client-server and P2P distributiοn?

Fοr client-server distributiοn:

The minimum distributiοn time can be calculated as the time it takes fοr the server tο uplοad the entire file tο all N peers:

Time = F / (N * di)

Since N = 500 and di = 5 Mbps = 5/8 MBps, we have:

Time [tex]= 15 * 10^9 / (500 * 5/8 * 10^6) = 7,680[/tex]secοnds

The server can uplοad at a rate οf us = 25 Mbps = 25/8 MBps, which means it can uplοad the entire file in:

Server time[tex]= F / us = 15 * 10^9 / (25/8 * 10^6) = 4,800[/tex]secοnds

Therefοre, the minimum distributiοn time fοr client-server distributiοn is 7,680 secοnds, which is the time it takes fοr all N peers tο dοwnlοad the file.

Fοr P2P distributiοn:

In P2P (peer-tο-peer) distributiοn, each peer can dοwnlοad the file frοm οther peers whο already have parts οf the file. Therefοre, the tοtal uplοad rate is the sum οf the uplοad rates οf all peers:

Tοtal uplοad rate = N * u = 500 * 12 Mbps = 6,000 Mbps

The minimum distributiοn time can be calculated as the time it takes fοr all peers tο receive the entire file. We can use the fοrmula:

Time = F / (tοtal uplοad rate - us)

Since the server's uplοad rate is us = 25 Mbps = 25/8 MBps, we have:

Time [tex]= 15 * 10^9 / (6,000 Mbps - 25 Mbps) = 2,545[/tex] secοnds

Therefοre, the minimum distributiοn time fοr P2P distributiοn is 2,545 secοnds, which is much faster than client-server distributiοn. This is because P2P distributiοn allοws peers tο dοwnlοad the file frοm each οther, which can reduce the lοad οn the server and speed up the distributiοn prοcess.

To learn more about P2P distribution, visit:

https://brainly.com/question/17407791

#SPJ1

write a basic program to calculate the area of a circle​

Answers

Answer: int main() {

float radius, area;

printf("\nEnter the radius of Circle : ");

scanf("%d", &radius);

area = 3.14 * radius * radius;

printf("\nArea of Circle : %f", area);

return (0);

Explanation:

Lana wants to start a new query by amending an old one. She should
A.) delete any old criteria.
B.) start the criteria with an asterisk.
C.) start the criteria with a question mark.
D.) add new queries to older ones.

Answers

Answer:

delete any old criteria

Abel is designing a website for a startup IT firm. He intends to discuss the web design with his client. Which tool should Abel use to help his client get a idea of how the website will look?

A. bulleted list of titles, subheadings, and images

B. chart depicting the navigational flow of the website

C. layout of each page with its respective elements

D. pictures and screenshots of websites of other firms

E. programming code for the website ​​

Answers

Answer:

c

Explanation:

D.
Is the correct answer

Arithmetic Instructions: Activity : Display 3 Digits (Assembly Code)
Hardcode a 3 digit value into a variable. Display the number

Answers

The value 123 is hardcoded into the "number" variable that is defined in this code. The programme then prepares the output by changing the value of "number" and initialising the registers with the proper values.

How many arithmetic instructions are there in three?

Binary, decimal, logical, shift/rotate, and bit/byte manipulation instructions are additional categories for the arithmetic instructions.

section .data

 number db 123 ; hardcode the 3-digit value

section .text

 global _start

_start:

 ; set up the output

 mov eax, 4 ; use the write system call

 mov ebx, 1 ; write to standard output

 mov ecx, number ; move the number variable into ecx

 mov edx, 3 ; print 3 characters

 ; display the number

 int 0x80 ; execute the system call

 ; exit the program

 mov eax, 1 ; use the exit system call

 xor ebx, ebx ; return 0 to indicate success

 int 0x80 ; execute the system call

To know more about programme visit:-

https://brainly.com/question/30307771

#SPJ1

Describe the steps of the diagnostic process, including methods and information that are used in the
understand the process methods and information that are used in the diagnostic process as a IT technician.
-information garthing
-information analysis
- solutions identification

Answers

As an IT technician, the diagnostic process typically involves the following steps:

Information GatheringInformation AnalysisSolution Identification

What is the  diagnostic process?

Information Gathering: The first step in the diagnostic process is to gather information from the user who reported the problem. This may involve asking questions about the symptoms they are experiencing, when the problem started, and any recent changes or updates that may have been made to the system.

Information Analysis: Once the information has been gathered, the next step is to analyze it in order to identify possible causes of the problem. This may involve reviewing system logs or error messages, checking system configurations, and running diagnostic tools to gather more information.

Solution Identification: After the information has been analyzed, the next step is to identify possible solutions to the problem. This may involve troubleshooting steps to isolate the cause of the problem or making changes to the system configuration or software settings.

In order to successfully complete the diagnostic process, IT technicians may use a variety of methods and tools, such as:

Remote access tools to connect to the user's system and troubleshoot the problem remotelyDiagnostic software tools to scan for system errors or issuesSystem logs and error messages to identify patterns or commonalities in the reported problemHardware testing tools to identify hardware-related problemsOnline forums and technical resources to search for solutions to similar problems that other users may have experienced.

Read more about diagnostic process here:

https://brainly.com/question/18428188

#SPJ1

Develop a program that ask for the number of tickets

Answers

Answer:

# Ask user for the number of tickets

num_tickets = input("How many tickets would you like to purchase? ")

# Convert the user input to an integer

num_tickets = int(num_tickets)

# Set the price per ticket

PRICE_PER_TICKET = 10

# Calculate the total cost

total_cost = num_tickets * PRICE_PER_TICKET

# Print the number of tickets and total cost to the user

print("You want to purchase " + str(num_tickets) + " tickets, and the total cost is $" + str(total_cost) + ".")

•Analiza tres anuncios con ofertas de trabajo relacionadas con distintos perfiles profesionales.

Answers

Answer:

Explanation:

what language is that?

What tool can be used to organize the structure of only the important pages of your website?

You can use a(n)_________ site map to organize the structure of only the important pages of your website.​

Answers

Answer:

You can use a "visual" site map to organize the structure of only the important pages of your website. A visual site map is a diagram or flowchart that provides an overview of the site's structure, including the main sections, subsections, and important pages. It helps to identify the most important pages and how they are connected, allowing you to prioritize content and ensure that the site is easy to navigate.

Explanation:

Seva wants to sort several tables in Access but doesn't know how. Which icon should she click on?
A.) the square with the "x"
B.) the overlapping squares
C.) the "abc" with the checkmark
D.) the circle with the question mark

Answers

Answer:

C.) the "abc" with the checkmark is the icon to sort tables in Access.

Explanation:

Which aspect of QA ensures that the design complies with the client's requirements?

in________,once the client approves the design list, all detailed layouts and models will be tested against this ​list​

Answers

Answer:

inspection

Explanation:

Answer:

The aspect of QA that ensures that the design complies with the client's requirements is called "Design Compliance Testing".

Explanation:

In Design Compliance Testing, the design and layout of the product or software are tested against the client's requirements to ensure that they meet the specified criteria. Once the client approves the design list, all detailed layouts and models are tested against this list to verify that the design is in compliance with the client's requirements. This helps to ensure that the final product meets the expectations and needs of the client.

You suspect a problem with a file that is important to one of your installed applications. You are running Windows 7 64-bit edition. You have thoroughly checked the Program Files folder and cannot find the folder that holds this application. What might be the problem?

Answers

Answer:

Explanation:

There could be a few potential problems that could be causing the issue:

The application might not have been installed correctly, and the files are located somewhere else on the computer. In this case, you may need to search the entire computer or contact the application's support team for assistance.

The application may have been uninstalled, or the files could have been deleted or moved. If this is the case, you may need to reinstall the application or restore the files from a backup.

The application might not be compatible with Windows 7 64-bit edition, and therefore, the files may not be stored in the Program Files folder. In this case, you may need to check the application's documentation or contact the support team to determine where the files are located.

Overall, it is essential to troubleshoot the issue thoroughly and gather as much information as possible to determine the root cause of the problem.

When designing a data backup and recovery plan, what’s the first thing to figure out

Answers

The first step in developing a data backup and recovery plan is determining what data needs to be backed up and how regularly. This entails determining the crucial systems and data.

What factors should you take into account while choosing backup and recovery procedures?

The physical aspects of carrying out the task, the requirement for backup, operational features, and the security and integrity of the backup media must all be taken into account when selecting backup and recovery solutions.

What component of a data backup solution is crucial?

To safeguard against primary data loss or corruption, it is essential to save a copy of the data on a different medium. An external drive is a straightforward example of an additional medium.

To know more about data backup visit:-

https://brainly.com/question/13025611

#SPJ1

Assignment 4: Divisible by Three need help pls pls plsss

Answers

Divisibility by three is a basic concept in arithmetic that is important to understand for various mathematical operations.

In order to determine if a number is divisible by three, you can use the rule of threes: add up the digits of the number and if the sum is divisible by three, then the original number is also divisible by three.For example, let's consider the number 453. We add the digits together: 4 + 5 + 3 = 12. Since 12 is divisible by three, we know that 453 is also divisible by three.This rule works for larger numbers as well. For instance, consider the number 6,201. Adding the digits gives us: 6 + 2 + 0 + 1 = 9. Since 9 is divisible by three, we can conclude that 6,201 is also divisible by three.Understanding the concept of divisibility by three is important for various mathematical operations such as long division, fractions, and even algebra.

To learn more about operations click the link below:

brainly.com/question/30651223

#SPJ1

Describe solid state drive (ssd)

Answers

The ssd is a type of drive that can perform the same function as the hard disk

An international bus touring company has two different ticket prices for its customers when they order online ahead of their departure time or at the gate:

Ticket Price Description:

Plan A: $19.95 per ticket online.

Plan B: $25.95 per ticket at the time of departure.

Plan C: $21.95 per ticket at the time of departure but in a group of 10 or more.

Write a program in Java that calculates a customer’s ticket when they order from all three plans. It should input customer name, mailing address, telephone number, which package the customer has purchased, and how many tickets were purchased.

Input Validation: Be sure the user only selects package A, B, or C. Display screenshots of the user using all three plans.

Answers

Answer:

import java.util.Scanner;

public class BusTicketCalculator {

   public static void main(String[] args) {

       Scanner input = new Scanner(System.in);

       // Get customer information

       System.out.println("Enter customer name:");

       String name = input.nextLine();

       System.out.println("Enter mailing address:");

       String address = input.nextLine();

       System.out.println("Enter telephone number:");

       String telephone = input.nextLine();

       // Get package and number of tickets

       System.out.println("Select a package (A, B, or C):");

       String packageOption = input.nextLine();

       while (!packageOption.equals("A") && !packageOption.equals("B") && !packageOption.equals("C")) {

           System.out.println("Invalid package selected. Please choose A, B, or C:");

           packageOption = input.nextLine();

       }

       System.out.println("Enter number of tickets:");

       int numTickets = input.nextInt();

       // Calculate ticket price based on package and number of tickets

       double ticketPrice = 0;

       if (packageOption.equals("A")) {

           ticketPrice = numTickets * 19.95;

       } else if (packageOption.equals("B")) {

           ticketPrice = numTickets * 25.95;

       } else if (packageOption.equals("C")) {

           if (numTickets >= 10) {

               ticketPrice = numTickets * 21.95;

           } else {

               ticketPrice = numTickets * 25.95;

           }

       }

       // Display ticket information

       System.out.println("\nTicket Information:");

       System.out.println("Name: " + name);

       System.out.println("Address: " + address);

       System.out.println("Telephone: " + telephone);

       System.out.println("Package: " + packageOption);

       System.out.println("Number of Tickets: " + numTickets);

       System.out.println("Total Price: $" + ticketPrice);

   }

}

This took a while as I am not extremely good at coding.

Explanation:

Here's an example Java program that calculates a customer's ticket when they order from all three plans and validates the input:

```
import java.util.Scanner;

public class TicketCalculator {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);

// Input customer information
System.out.print("Enter customer name: ");
String name = input.nextLine();
System.out.print("Enter mailing address: ");
String address = input.nextLine();
System.out.print("Enter telephone number: ");
String phone = input.nextLine();

// Input ticket information
System.out.print("Enter package (A, B, or C): ");
String packageCode = input.nextLine().toUpperCase();
while (!packageCode.equals("A") && !packageCode.equals("B") && !packageCode.equals("C")) {
System.out.print("Invalid package. Enter package (A, B, or C): ");
packageCode = input.nextLine().toUpperCase();
}
System.out.print("Enter number of tickets: ");
int numTickets = input.nextInt();

// Calculate ticket price
double ticketPrice;
if (packageCode.equals("A")) {
ticketPrice = 19.95;
} else if (packageCode.equals("B")) {
ticketPrice = 25.95;
} else {
if (numTickets >= 10) {
ticketPrice = 21.95;
} else {
ticketPrice = 25.95;
}
}

// Display ticket information
System.out.println("\nTicket Information");
System.out.println("Customer: " + name);
System.out.println("Address: " + address);
System.out.println("Phone: " + phone);
System.out.println("Package: " + packageCode);
System.out.println("Number of tickets: " + numTickets);
System.out.printf("Price per ticket: $%.2f\n", ticketPrice);
System.out.printf("Total price: $%.2f\n", ticketPrice * numTickets);
}
}
```

In this program, we first use the `Scanner` class to input the customer's name, mailing address, and telephone number. We then input the package code and validate it using a `while` loop. If the package code is invalid, we prompt the user to enter it again until it is valid. We also input the number of tickets. We then calculate the ticket price based on the package code and number of tickets, using an `if` statement for packages A and B and a nested `if` statement for package C. Finally, we display the ticket information, including the customer's name, address, and phone number, the package code, the number of tickets, the price per ticket, and the total price. We use the `printf()` method to format the output with two decimal places for the ticket prices.

If cell A2 contains "Today is Monday," the result of the function =LEN(A2) would be __________. Fill in the blank space.

Excel Quiz.​

Answers

If cell A2 includes the phrase "Today is Monday," the result of the function =LEN(A2) would be 15, which is the number of characters in the cell.

How can I figure out how many characters there are in Excel?

Type =LEN(cell) in the formula bar and hit Enter to invoke the function. In many instances, cell refers to the cell that you want to count, like B1. Enter the formula, then copy and paste it into further cells to count the characters in each cell.

What does Len have to offer?

A number is returned by LEN after it counts the characters in the text, including spaces and punctuation. LEN is set to zero if text is an empty string ("") or a reference to an empty cell.

To know more about cell visit:-

https://brainly.com/question/8029562

#SPJ1

3.1 ldentify TWO possible reasons for unemployment.​

Answers

Here are two potential causes of unemployment:

Structural unemployment: This happens when job seekers' abilities and available job requirements are not compatible. This can occur when technological advancements make certain positions obsolete or when there is a shift in demand for specific types of work, leaving workers with outdated skills unemployed.Cyclical unemployment: This type of unemployment results from changes in the business cycle, where the economy experiences periods of growth and decline. During recessions or downturns, firms may decrease production and lay off employees to decrease expenses, resulting in an increase in cyclical unemployment.

Discuss in details the difference among programmed I/O, Interrupt Driven I/O
and Direct Memory access over the processor

Answers

Answer:

Programmed I/O, Interrupt Driven I/O, and Direct Memory Access (DMA) are three methods of transferring data between input/output (I/O) devices and the central processing unit (CPU) of a computer system.

Programmed I/O:

In programmed I/O, the CPU executes instructions to transfer data between the I/O device and memory. The CPU continuously polls the I/O device to check if it is ready to send or receive data. This method is simple and easy to implement, but it is also inefficient since the CPU has to wait for the I/O device to be ready before it can perform any other task.

Interrupt Driven I/O:

In interrupt-driven I/O, the CPU sends a command to the I/O device to start the data transfer, and then continues to perform other tasks. When the I/O device has completed the data transfer, it interrupts the CPU to signal that the data is ready. The CPU then stops its current task and processes the interrupt by executing an interrupt service routine (ISR) to transfer the data between the I/O device and memory. This method is more efficient than programmed I/O since the CPU can perform other tasks while waiting for the I/O device to complete the data transfer.

Direct Memory Access (DMA):

In Direct Memory Access (DMA), the I/O device can access the system memory directly without the intervention of the CPU. The I/O device sends a request to the DMA controller to initiate the data transfer, and the DMA controller transfers the data between the I/O device and memory without any involvement of the CPU. The CPU can continue to perform other tasks while the DMA controller performs the data transfer. This method is the most efficient of the three since it frees up the CPU to perform other tasks while the data transfer is being performed.

In summary, the main differences among programmed I/O, interrupt-driven I/O, and DMA are:

Programmed I/O is the simplest method of data transfer, but it is also the least efficient since the CPU has to continuously poll the I/O device to transfer data.

Interrupt-driven I/O is more efficient than programmed I/O since the CPU can perform other tasks while waiting for the I/O device to complete the data transfer.

DMA is the most efficient method of data transfer since it frees up the CPU to perform other tasks while the DMA controller performs the data transfer directly between the I/O device and memory.

A program is required to compute the cost of a car trip. The required input values are:

Litres per 100km
Distance travelled
Cost per litre of petrol
The output value is the total cost of the trip.

Answers

The program required to compute the above in Phyton is given below.

What is the program that computes the cost of a car trip using the above parameters?

the required program is given as follows;

# Input values

litres_per_100km = float(input("Enter the fuel efficiency of your car in litres per 100km: "))

distance_travelled = float(input("Enter the distance travelled in km: "))

cost_per_litre = float(input("Enter the cost per litre of petrol in your local currency: "))

# Calculate the total litres of petrol used

litres_used = (litres_per_100km / 100) * distance_travelled

# Calculate the total cost of the trip

total_cost = litres_used * cost_per_litre

# Display the result

print(f"The total cost of the trip is {total_cost:.2f} {currency_symbol}")



Note that this program prompts the user to enter the fuel efficiency of their car in litres per 100km, the distance travelled in km, and the cost per litre of petrol in their local currency.

It then calculates the total litres of petrol used by multiplying the fuel efficiency by the distance travelled, and calculates the total cost of the trip by multiplying the litres used by the cost per litre.

Finally, it displays the result to the user, rounded to two decimal places. Note that the currency symbol can be added to the output string depending on the user's location.

Learn more about phyton:

https://brainly.com/question/16757242
#SPJ1

Draw a state process model with two (2) suspend states and fully discuss the
transition of processes from one state to the next by OS.

Answers

This process model features two suspend states—Waiting and Suspended—along with three active states—Ready, Running, and Interrupted. There is also a further state known as Zombie.

What two states are there in the two state process model?

A two-state model, which has just the two states listed below, is the simplest model for the process state. Currently running state: A state in which the process is active. A process in the "not running" state is one that is awaiting execution.

Suspended process: what is it?

The operating system suspends one process by putting it in the Suspended state and moving it to disc if a process in main memory enters the blocked state.

To know more about Interrupted visit:-

https://brainly.com/question/29770273

#SPJ1

Karl has designed an interactive stories website for kids. He has implemented an alphabetical format for browsing through the stories. Which structure will he use for easy navigation?

Karl implements a _________ structure for users to advance through the chapters.​

Answers

Answer:

Karl implements an alphabetical structure for users to browse through the stories.

Explanation:

Shifts in production possibilities Suppose the fictional country of Yosemite produces two types of goods: agricultural and capital. The following diagram shows its current production possibilities frontier for sorghum, an agricultural good, and microprocessors, a capital good. Drag the production possibilities frontier (PPF) on the graph to show the effects of a breakout of avian flu that sickens millions of workers. Note: Select either end of the curve on the graph to make the endpoints appear. Then drag one or both endpoints to the desired position. Points will snap into position, so if you try to move a point and it snaps back to its original position, just drag it a little farther.

Answers

The drag the production possibilities frontier (PPF) on the graph to show the effects of a breakout of avian flu that sickens millions of workers would shift the PPF inwards towards the origin.

What is production possibilities frontier (PPF)?

The production possibilities frontier (PPF) is an economic concept that illustrates the maximum amount of output an economy can produce with a given amount of inputs. It is a graphical representation of the combination of two or more products that an economy can produce with the available resources. The PPF depicts the maximum possible production at different levels of inputs and shows the trade-offs between the two products.

This is because the avian flu would reduce the number of workers available to produce the goods, thus reducing the amount of goods that can be produced at any given time.

To learn more about production possibilities frontier (PPF)

https://brainly.com/question/30627326

#SPJ9

Which shows the correct order for creating a new column in Datasheet view?
Scroll to the left, select data type, click on Click to Add, and name the field.
O Scroll to the right, select data type, name the field, and click on Click to Add.
Scroll to the left, select data type, name the field, and click on Click to Add
Scroll to the right, click on Click to Add, select data type, and name the field.

Answers

Answer:

Scroll to the right, click on Click to Add, select data type, and name the field.

Explanation:

can anyone help?


what are the arguments of the function?


Answer choices are
1. Mystery
2. 1
3. 4,8,3
or
4. a,b,c

Answers

4, 8, 3 are the arguments of the given code

What are the arguments?

Those are the values that are passed into the function and are represented as parameters.

According to the given Javascript code,

The first condition (a < b && b < c) is not true, as 8 is not less than 3.The second condition (b < a && a < c) is not true, as 8 is not less than 4.The third condition (c < a && c < b) is true, as 3 is less than both 4 and 8.

If we look at what values are passed in where the function is called. In this case, it gets called in the purple block (console.log). 4, 8, 3 are the arguments of the given code and this is the answer to the given question

Read more about javascript here:

https://brainly.com/question/28021308

#SPJ1

1. Which of the following supports a vehicle's weight?
OA. Shock
OB. Idler arm
OC. Stabilizer link
OD. Spring

Answers

The component that supports a vehicle's weight is the spring.

What is the Spring?

The spring is responsible for absorbing the shock and weight of the vehicle, ensuring a smooth ride for the passengers. The idler arm is part of the steering system, while the stabilizer link helps to control the vehicle's sway and stability during turns.

The shock, on the other hand, helps to dampen the bounce and movement of the vehicle. While all of these components play a vital role in a vehicle's performance, it is ultimately the spring that bears the weight and keeps the vehicle stable on the road.

Read more about vehicles here:

https://brainly.com/question/28918094

#SPJ1

Write a program that accepts the name of a group of 5 students and their age one by one. The program will then calculate the average of their ages and will print the result. The program will also print the name and age of the oldest person in the list.​

Answers

Here's a Python program that accepts the name and age of five students, calculates the average of their ages, and prints the name and age of the oldest student:

# initialize variables

names = []

ages = []

max_age = 0

max_name = ""

# loop to get names and ages

for i in range(5):

   name = input("Enter student name: ")

   age = int(input("Enter student age: "))

   names.append(name)

   ages.append(age)

   if age > max_age:

       max_age = age

       max_name = name

# calculate average age

avg_age = sum(ages) / len(ages)

# print results

print("Average age: ", avg_age)

print("Oldest student: ", max_name, max_age)

This program uses a list to store the names and ages of the students. It also keeps track of the maximum age and the corresponding name as it iterates through the input loop. Finally, it calculates the average age and prints out the results.

Answer:

Hey there! I remember based off the last one we needed a beginner friendly version rather than a advanced version! So with that in mind...

names = [None] * 5

ages = [0] * 5

# Collect the names and ages of the 5 students

for i in range(5):

   name = input("Please enter the name of student " + str(i + 1) + ": ")

   age = int(input("Please enter the age of student " + str(i + 1) + ": "))

   names[i] = name

   ages[i] = age

# Calculate the average age

average_age = sum(ages) / len(ages)

# Find the oldest student

oldest_age = max(ages)

oldest_index = ages.index(oldest_age)

oldest_name = names[oldest_index]

# Print the results

print("The average age is:", average_age)

print("The oldest student is " + oldest_name + " with an age of " + str(oldest_age))

Explanation:

We create two lists, names and ages, with 5 elements each. The names list is initialized with None values, and the ages list is initialized with 0 values.

Then, we use a for loop to iterate 5 times, as we want to collect information about 5 students. In each iteration, we ask the user to input the name and age of a student.

We use the input() function to get the name of the student and directly assign it to the corresponding index in the names list using names[i] = name.

We use the int() function to convert the user input into an integer (since age is a whole number) and directly assign it to the corresponding index in the ages list using ages[i] = age.

After collecting all the information, we calculate the average age by summing up all the ages in the ages list using the sum() function and dividing it by the number of students (in this case, 5).

To find the oldest student, we first determine the highest age using the max() function, which returns the maximum value in the ages list. Then, we use the index() method to find the index of the oldest age in the ages list. With this index, we can find the corresponding name of the oldest student in the names list.

Finally, we print the average age and the name and age of the oldest student using the print() function.

NOTE: The main difference in this version of the code is that we initialize the lists with a fixed size and assign values directly to each index instead of using the append() method to add elements to the lists.

Types of Selective Enforcement?​

Answers

Answer:

In law, selective enforcement occurs when government officials (such as police officers, prosecutors, or regulators) exercise discretion, which is the power to choose whether or how to punish a person who has violated the law. The biased use of enforcement discretion, such as that based on racial prejudice or corruption, is usually considered a legal abuse and a threat to the rule of law.

In some cases, selective enforcement may be desirable.[1] For example, a verbal warning to a teenager may effectively alter their behavior without resorting to legal punishment and with the added benefit of reducing governmental legal costs. In other cases, selective enforcement may be inevitable. For example, it may be impractical for police officers to issue traffic tickets to every driver they observe exceeding the speed limit, so they may have no choice but to limit action to the most flagrant examples of reckless driving. Therefore, the mere fact that a law is selectively enforced against one person and not against another, absent bias or pattern of enforcement against a constitutionally-protected class, is not illegal.

how do you add characters on super smash bros crusade

Answers

Answer:

Download the character you want to add as a ".zip" or ".rar" file.

Extract the files from the archive to a folder on your computer.

Open the Super Smash Bros. Crusade folder and locate the "fighters" folder.

In the fighters folder, create a new folder with the name of the character you want to add.

Copy the extracted files from the character archive into the new folder you just created.

Start Super Smash Bros. Crusade and go to the character select screen.

If the character you added is not automatically unlocked, you may need to unlock them by completing certain objectives in the game.

Explanation:

what is the storage of z900​ mainframe computer

Answers

Assuming you are referring to the IBM System z900 mainframe computer, the storage capacity can vary depending on the specific configuration and options selected.

The z900 uses high-speed storage technologies such as solid-state drives (SSDs) and magnetic disk drives (HDDs) to store data. The system can support various storage configurations, including internal and external storage options.

The internal storage options for the z900 include up to 32GB of main memory (RAM), which is used for active program and data storage during processing. Additionally, the z900 can support up to 136TB of disk storage, which can be divided into multiple logical partitions (LPARs) to provide secure and isolated storage for different applications or users.

Other Questions
Question 4 [14 marks]Part a) (6 marks)Find the following probabilities by checking the z table i) P(-1.5ii) P((1.15Z0.35Part b) (8 marks)Battery manufacturers compete on the basis of the amount of time their products last in cameras and toys. A manufacturer of alkaline batteries has observed that its batteries last for an average 26 hours when used in a toy racing car. The amount of time is normally distributed with a standard division of 2.5 hours.What is the probability that the battery lasts between 25 and 29 hours?What is the probability that the battery lasts longer than 29 hoursWhat is the probability that the battery lasts less than 25 hours. Choose the right option.1. Would you like to travel with Diana?Surely, I know her______ to accompany her.a)well enough b)good enough c)enough well d)enough good 2.______ the detective examine the accused? Yes, but he fully denied breaking into the bank.a)Was b)Did c)Does d)Do3. Jon couldn't join his friends to the cinema yesterday.He had ____ to do.a)too many homework b)too homeworksc)very many homework d)too much homework 4.He said Bill _____ mistake again.a)Had done the same b)has made the samec)had made same d)had made the same5.if _____ you can find the clue to the case the agency will employ them.a)any b)some of c)any of d)some Ships carrying goods from Canada travel on the A. Pacific Ocean to trade with Asia B. Great lakes to trade with Mexico. C. Indian Ocean to trade with Europe. D. Atlantic Ocean to trade with Russia Find the value of x and y from the given figure. \( \ln \left[\frac{\left(x^{3}-2\right)^{5} \cdot \sqrt{x^{3}}}{2 \cdot \sqrt[3]{(4 x+1)^{7}}}\right]= \) A 80 kg passenger is seated 12 m from the center of the loop of a roller coaster. What centripetal force does the passenger experience when the roller coaster reaches an angular speed of 3.14 rad/s? Fc = (m)(r)(2) Describe the three types of fossils. Agnes earns $25,000 as salary. His deductions include a tax of $3,400 and medical expenses of $1,250. He also receives a travel allowance of $1,050. What will be his net pay? an adviser that charges a performance fee to clients must disclose that such a fee arrangement: a will give the adviser increased compensation based on realized and unrealized appreciation of the customer's securities b better aligns the customer's interests with those of the investment adviser c is only permitted if the customer signs a liability waiver in the advisory contract d negates the fiduciary duty that the adviser has to the customer Which of the following is a reason colonists came to and settled in America?Responsesto gain greater economic opportunitiesto gain greater economic opportunitiesto experience a new countryto experience a new countryto sail on the Mayflowerto sail on the Mayflowerto have more technological advancesto have more technological advances What is 2/3 x 3/8 show your work Explain about multiple housing in urban economics with examples for understanding. 62.6 Advice the young job seekers on strategies they can follow if they experienerejection Question: Give reason Guru Nayak looked gratified to hear astrologer's opinion 1). 2). Which situations describe similar but not congruent triangles? Triangle TUV is rotated 180 clockwise about the origin and translated 3 units up to create T'U'V'.Two of the angles of ABC have the same measures as two of the angles of DEF, and all of the corresponding side lengths of the two triangles are different. The three angles of GHI have the same measures as the three angles of QRS, and the side lengths of GHI are twice the corresponding side lengths of QRS. Triangle PQR is dilated about the origin by a scale factor of and reflected across the y-axis to create P'Q'R'. The three side lengths of JKL are the same as the three corresponding side lengths of XYZ, and one of the angles of JKL has the same measure as one of the angles of XYZ. Shelby is an American living in New Zealand.On the Fourth of July, she attends a party with other Americans.She wears an American flag shirt, sings the national anthem, and proclaims her love for popular American sports like baseball and football.Which of the following factors most likely impacted Shelby enacting her American identity?A)Hierarchy of identitiesB)Social NetworksC)Need for identity supportD)Situational opportunities Describe four key elements of the physical environment that determine which species canlive in a particular area. A.) Name any one product whose sales would fluctuate only a small amount during a business cycle. B.) Suppose the index of leading economic indicators fall for several months. Using this data as a hint what would you foresee happening to the future economy? a. Is there a need for a CRM system at Global Bike Group? Discuss. (150-200 words) (5 Marks) b. CRM systems can be Strategic, Operational, or Tactical. Analyse the Use-cases for these at GBI. (250-300 words) (6 Marks) c. Identify and compare at least 3 specific CRM systems. Which of these would be most appropriate for GBI? Provide a justification for your selection. (3 Which of the following are valid conclusions given parallelogram ABCD with diagonals AC and BD? You may select more than one answer