[Solved]Unload People Self Nunpeople Attempts Remove Nun People Bus Number People Supplied Larger Q37283356
python help please. Cannot import anything except math
* . unload people(self, nun_people)::Attempts to remove nun people from the bus. If the number of people supplied is larger than the number of people on the bus currently, return False and do not change the number of people currently on the bus. [You may imagine this as “the people are so confused by the request that they just stay where they are looking confused”] Classes Many of the methods required below are very regular- after youve seen one_init_method on this program, you’ve sort of seen them all. While there might be a bit more typing than usual, the amount of mental work to solve the puzzle” should be a bit minimal once you get used to the patterns. You will be writing four classes (Bus, Town, and Journey). Make sure you understand what these represent and how they relate to each other before continuing. Note and Assumptions: ‘ You can assume that num people is always a non-negative integer. This function should return True if the people were unloaded from the bus. Town class: Bus class: Instance variables Instance variables: # te nan, of thg town : stnng int int int string # the name of the bus # the naxínum number of people the bus can transport i the number of people currently on the bus # how fast the bus travels (in feet per second) loc x the town’s x location (in an x-y-coordinate system) # the town’s y location (in an x-y-coordinate system) # how long (in number of seconds) buss stop in this town :int max_people e nun people 1oc int stop tine . speed fps Methods: Methods: init (self, name, loc x, loc y, stop tine) constructor, initializes all instance variables. Assumption: All incoming arguments are good; there is no need to perform any checking. speed fps) :: constructor, initializes all instance variables, -init-(self, nun people should default to 0 when a bus is created with the constructor. max people, . nane, o o Assumptions: str(self) retus string representation with this fonmat (note, the quotes in the example are speed_fps and nax_people will always be a non-negative number name will be a non-empty string * just our string boundaries! The first character in this example string is N): Smithfield (e,3) Exchange tie:5.88 minutes” _str一(self) :: returns string representation with this format: Bus named GreyDog with S people will travel at 18.28mph o Notes: · The (03) in the example above are the coordinates of the town. Stop time is converted to number of minutes with 2 digits after the decimal point ” o Notes: ” The quotes in the example are just our string boundaries! The first character in the above example is B. This method reports nun _people (NOT max_people). ” . eq (self, other):: Override thecthod for Town objects; returns True or False. Cities should be “o each other if they are at the same kation (loc_x and loc_y), regardless of their name or stop time. For example, Town(“Smithfield”, 0, @, θ) and Town(“Snithy”, θ, θ, 10) would be the same since they are physically kocated in the same location. Bus speed is converted to mile per hour and always presented with 2 digits after the decimal point tine_to_travel (self, distance feet) travel distance_feet (distance in fect). Notes and Assumptions Returns how long (in whole seconds) this bus wl ake to distance_to_toun(self, town) Returns the distance between two towns (based on their x and y locations) as a loat (no truncating). Remember ab-c! o This always returns an integer – you could use integer division () or normal division followed by int) conversion to truncate the fractional part. You can assume that distance feet is always a non-negative integer. ourney class: Instance variables bus load_people(self, num_people) Attempts to put num_people onto the bus and update nun_people. If the number of people supplied would not fit on the bus, return False and do not change the number of pcople currently on the bus. [You may imagine this as “the pcople get into a fight and no one is allowed on the bus”.] :Bus # the bus r king the journey V the towns the bus will visit, in order # the time the bus will begin its journey # (in seconds since January 1st, 1970) list of Town objects int e destinations start tine Note and Assumptions: o You can assume that nun people is always a non-negative integer This function should return True if the people were loaded on the bus. Note: Why Thursday, Jan. Ist 1970? See: Show transcribed image text * . unload people(self, nun_people)::Attempts to remove nun people from the bus. If the number of people supplied is larger than the number of people on the bus currently, return False and do not change the number of people currently on the bus. [You may imagine this as “the people are so confused by the request that they just stay where they are looking confused”] Classes Many of the methods required below are very regular- after youve seen one_init_method on this program, you’ve sort of seen them all. While there might be a bit more typing than usual, the amount of mental work to solve the puzzle” should be a bit minimal once you get used to the patterns. You will be writing four classes (Bus, Town, and Journey). Make sure you understand what these represent and how they relate to each other before continuing. Note and Assumptions: ‘ You can assume that num people is always a non-negative integer. This function should return True if the people were unloaded from the bus. Town class: Bus class: Instance variables Instance variables: # te nan, of thg town : stnng int int int string # the name of the bus # the naxínum number of people the bus can transport i the number of people currently on the bus # how fast the bus travels (in feet per second) loc x the town’s x location (in an x-y-coordinate system) # the town’s y location (in an x-y-coordinate system) # how long (in number of seconds) buss stop in this town :int max_people e nun people 1oc int stop tine . speed fps Methods: Methods: init (self, name, loc x, loc y, stop tine) constructor, initializes all instance variables. Assumption: All incoming arguments are good; there is no need to perform any checking. speed fps) :: constructor, initializes all instance variables, -init-(self, nun people should default to 0 when a bus is created with the constructor. max people, . nane, o o Assumptions: str(self) retus string representation with this fonmat (note, the quotes in the example are speed_fps and nax_people will always be a non-negative number name will be a non-empty string * just our string boundaries! The first character in this example string is N): Smithfield (e,3) Exchange tie:5.88 minutes” _str一(self) :: returns string representation with this format: Bus named GreyDog with S people will travel at 18.28mph o Notes: · The (03) in the example above are the coordinates of the town. Stop time is converted to number of minutes with 2 digits after the decimal point ” o Notes: ” The quotes in the example are just our string boundaries! The first character in the above example is B. This method reports nun _people (NOT max_people). ” . eq (self, other):: Override thecthod for Town objects; returns True or False. Cities should be “o each other if they are at the same kation (loc_x and loc_y), regardless of their name or stop time. For example, Town(“Smithfield”, 0, @, θ) and Town(“Snithy”, θ, θ, 10) would be the same since they are physically kocated in the same location. Bus speed is converted to mile per hour and always presented with 2 digits after the decimal point tine_to_travel (self, distance feet) travel distance_feet (distance in fect). Notes and Assumptions Returns how long (in whole seconds) this bus wl ake to distance_to_toun(self, town) Returns the distance between two towns (based on their x and y locations) as a loat (no truncating). Remember ab-c! o This always returns an integer – you could use integer division () or normal division followed by int) conversion to truncate the fractional part. You can assume that distance feet is always a non-negative integer. ourney class: Instance variables bus load_people(self, num_people) Attempts to put num_people onto the bus and update nun_people. If the number of people supplied would not fit on the bus, return False and do not change the number of pcople currently on the bus. [You may imagine this as “the pcople get into a fight and no one is allowed on the bus”.] :Bus # the bus r king the journey V the towns the bus will visit, in order # the time the bus will begin its journey # (in seconds since January 1st, 1970) list of Town objects int e destinations start tine Note and Assumptions: o You can assume that nun people is always a non-negative integer This function should return True if the people were loaded on the bus. Note: Why Thursday, Jan. Ist 1970? See:
Expert Answer
Answer to * . unload people(self, nun_people)::Attempts to remove nun people from the bus. If the number of people supplied is lar… . . .
[Solved]Using Warshall S Algorithm Find Transitive Closure Graph Represented Following Adjacency Q37287931
A. Using Warshall’s algorithm, find the transitive closure forthe graph represented by the following adjacency matrix

B. Using Floyd’s algorithm, solve the all-pairs shortest pathproblem for the digraph with the following weight matrix

01010 10100 01000 10001 00100 0 2 00 18 5032ㆀ Show transcribed image text 01010 10100 01000 10001 00100
0 2 00 18 5032ㆀ
Expert Answer
Answer to A. Using Warshall’s algorithm, find the transitive closure for the graph represented by the following adjacency matrix … . . .
[Solved]Write C Code Define Isr Handles Uart1 Peripheral Interrupt Teensy 32 B Enable Interrupt C Q37159610


just c and d.
a. Write the C code to define an ISR that handles UART1 peripheral interrupt on the Teensy 3.2. b. If you enable an interrupt in your C code, but don’t define the ISR, what code executes when the interrupt is triggered? c. According to the datasheet, Teensy 3.2 has 2 pin change interrupts, PCINTO and PCINT 1, yet al /O pins are “interruptable”. Explain how each pin change is serviced with only 2 pin change interrupts and how different events (rising, falling etc.) are captured Suppose we have a program with two ISRs, ISRO (priority O) and ISR1 (priority 1) defined below: int mainO d. while(1) void isroO disable.irq:/ disable interrupts do some stuff that takes 99 clock cycles enable-irq enable interrupts void isr10 disableirq): // disable interrupts /do some stuff that takes 142 clock cycles –enable-İrgl); //enable 1nterrupts If the datasheet states the interrupt latency is 15 cycles and nested interrupts are not supported, what is the system latency? Show transcribed image text a. Write the C code to define an ISR that handles UART1 peripheral interrupt on the Teensy 3.2. b. If you enable an interrupt in your C code, but don’t define the ISR, what code executes when the interrupt is triggered? c. According to the datasheet, Teensy 3.2 has 2 pin change interrupts, PCINTO and PCINT 1, yet al /O pins are “interruptable”. Explain how each pin change is serviced with only 2 pin change interrupts and how different events (rising, falling etc.) are captured Suppose we have a program with two ISRs, ISRO (priority O) and ISR1 (priority 1) defined below: int mainO d. while(1) void isroO disable.irq:/ disable interrupts do some stuff that takes 99 clock cycles enable-irq enable interrupts void isr10 disableirq): // disable interrupts /do some stuff that takes 142 clock cycles –enable-İrgl); //enable 1nterrupts
If the datasheet states the interrupt latency is 15 cycles and nested interrupts are not supported, what is the system latency?
Expert Answer
Answer to a. Write the C code to define an ISR that handles UART1 peripheral interrupt on the Teensy 3.2. b. If you enable an inte… . . .
[Solved]Visualice Python Java Levascrip Visudlicze Python Jlava Lavasenpx 0ojtec212020449 20194 A Q37293441
whats the code to this star project project in python 2.7?
. Visualice Python Java, levaScrip Visudlicze Python, Jlava lavasenpx + 0OJTEC2120.20449 20194/asgs/stars project.html getStarString0 1 Input Parameter: a star’s name Return the star string of the star with matching name in the file stars.txt If no star with a matching name can be found, an error message should be printed and the be returned Hant: Search the file line by ine using the getStarName) function to se if the correct star string has been found Below are example function calls getStarString(“POLARIS-. “ο 010128,0007897,0 99991 8,8890. 197,424pOLARS. * getStarStrne(“BOB”) → ” with pr nted error mag-ERROR: No star called BOB could be found ” drawStarByName0 1 Imput Parameter: a star’s name No Returm Value Hint:Just use the getStarStringO and drawStar) functions to draw the mamed star Below are example function calls o drawStarBy o draw StarByName SIRIUS DELL Show transcribed image text . Visualice Python Java, levaScrip Visudlicze Python, Jlava lavasenpx + 0OJTEC2120.20449 20194/asgs/stars project.html getStarString0 1 Input Parameter: a star’s name Return the star string of the star with matching name in the file stars.txt If no star with a matching name can be found, an error message should be printed and the be returned Hant: Search the file line by ine using the getStarName) function to se if the correct star string has been found Below are example function calls getStarString(“POLARIS-. “ο 010128,0007897,0 99991 8,8890. 197,424pOLARS. * getStarStrne(“BOB”) → ” with pr nted error mag-ERROR: No star called BOB could be found ” drawStarByName0 1 Imput Parameter: a star’s name No Returm Value Hint:Just use the getStarStringO and drawStar) functions to draw the mamed star Below are example function calls o drawStarBy o draw StarByName SIRIUS DELL
Expert Answer
Answer to . Visualice Python Java, levaScrip Visudlicze Python, Jlava lavasenpx + 0OJTEC2120.20449 20194/asgs/stars project.html g… . . .
[Solved]Write Php Script Using Regular Expressions Validating Data Submitted Form Two Text Fields Q37266778
i need help with this php



. Write a PHP script using regular expressions for validating the data submitted by a form with two text fields, simplified IP address and date as shown in the nine screenshots of my browser window. The required format for the IP address containing digits separated by dot characteris: ddd. ddd. d. dd, while the required date format is mm/dd/yyyy. The script will accept the inputs from textboxes. Hint: Along with input validation it is also important that any data the user has already entered remains on the form. This means that the form returned when the input does not pass the validation should remember the entered values it should be sticky). My “Forms and PHP” PowerPoint slides (p. 36-54) show how to do that. For styling your message and intuitive well positioned warnings please review Assignment 1 solution. We were unable to transcribe this imageWe were unable to transcribe this imageWe were unable to transcribe this imageWe were unable to transcribe this imageShow transcribed image text . Write a PHP script using regular expressions for validating the data submitted by a form with two text fields, simplified IP address and date as shown in the nine screenshots of my browser window. The required format for the IP address containing digits separated by dot characteris: ddd. ddd. d. dd, while the required date format is mm/dd/yyyy. The script will accept the inputs from textboxes. Hint: Along with input validation it is also important that any data the user has already entered remains on the form. This means that the form returned when the input does not pass the validation should remember the entered values it should be sticky). My “Forms and PHP” PowerPoint slides (p. 36-54) show how to do that. For styling your message and intuitive well positioned warnings please review Assignment 1 solution.
Expert Answer
Answer to . Write a PHP script using regular expressions for validating the data submitted by a form with two text fields, simplif… . . .
[Solved]Write Matlab Program Takes Two 2d Arrays May Different Dimensions Extracts 1d Array Examp Q37293088
a. Write a MATLAB program that takes two 2D arrays (they may beof different dimensions) and extracts them into 1D array. Example:If A= [1 2 3; 4 5 6; 3 2 5] and B= [4 5; 1 2; 3 9] Output= [1 2 3 45 4 5 6 1 2 3 2 5 3 9] If A= [1 2 3; 4 5 6] and B= [4 5; 1 2; 3 9]Output= [1 2 3 4 5 4 5 6 1 2 3 9]
Expert Answer
Answer to a. Write a MATLAB program that takes two 2D arrays (they may be of different dimensions) and extracts them into 1D array… . . .
[Solved]Write Script Solve Display Following System Equations Symbolic Expression B Convert Symbo Q37222793
PLEASE USE MATLAB ONLY

a. Write a script to solve and display the following system equations as Symbolic Expression b. Now convert your Symbolic Quantity into Numeric Quantity and display 4x, -x2 +x,10 2X1 + X2 + X3-5X4 =-3 3×1 + 2×2-4×3 = 4 Show transcribed image text a. Write a script to solve and display the following system equations as Symbolic Expression b. Now convert your Symbolic Quantity into Numeric Quantity and display 4x, -x2 +x,10 2X1 + X2 + X3-5X4 =-3 3×1 + 2×2-4×3 = 4
Expert Answer
Answer to a. Write a script to solve and display the following system equations as Symbolic Expression b. Now convert your Symboli… . . .
[Solved]Write Program Named Manytbread S Create Number N Threads Specified Command Line Prints He Q37226507

LINUX C++
a. Write a program named manytbread s that will create a number N of threads specified in the command line, each of which prints out a hello message and its own thread ID. To see how the execution of the threads interleaves, make the main thread sleep for 1 second for every 4 threads it creates. For example, when running the program as follows The output of your code should be similar to: I am thread 1. Created new thread (4) İn iteration 0 Hello from thread 4- I as created in iteration 0 I am thread 1. Created new thread (6) İn İteration 1 I am thread 1. create I am thread 1. Created new thread (8) ǐn iteration 3 I am thread 1. Create I am thread 1. Created new thread (10) in iteration 5 Hello from thread 6-1 was created in iteration 1 tello from thread 7- 1 vas created in iteration a Hello from thread 8I was created in iteration 3 Hello from thread 9 – I vae created in i Hello from thread 10-1 was created İnİteration 5 I am thread 1. Created new thread (11) in iteration 6… I am thread 1. Created new thread (12) in iteration 7 Hell from thread 11-1 was created in iteration 6 He 11° from thread 12-1 was created in iteration 7 d new thread (7) in iteration 2 d new thread (9) in iteration 4 teration 4 Show transcribed image text a. Write a program named manytbread s that will create a number N of threads specified in the command line, each of which prints out a hello message and its own thread ID. To see how the execution of the threads interleaves, make the main thread sleep for 1 second for every 4 threads it creates. For example, when running the program as follows The output of your code should be similar to: I am thread 1. Created new thread (4) İn iteration 0 Hello from thread 4- I as created in iteration 0 I am thread 1. Created new thread (6) İn İteration 1 I am thread 1. create I am thread 1. Created new thread (8) ǐn iteration 3 I am thread 1. Create I am thread 1. Created new thread (10) in iteration 5 Hello from thread 6-1 was created in iteration 1 tello from thread 7- 1 vas created in iteration a Hello from thread 8I was created in iteration 3 Hello from thread 9 – I vae created in i Hello from thread 10-1 was created İnİteration 5 I am thread 1. Created new thread (11) in iteration 6… I am thread 1. Created new thread (12) in iteration 7 Hell from thread 11-1 was created in iteration 6 He 11° from thread 12-1 was created in iteration 7 d new thread (7) in iteration 2 d new thread (9) in iteration 4 teration 4
Expert Answer
Answer to a. Write a program named manytbread s that will create a number N of threads specified in the command line, each of whic… . . .
[Solved]0 1 Pts Nanswered Question 29 Output Following Code Int 1 2 Intj 0 J Q37265359
Can someone explain this to me in full details, thank you

0/1 pts nanswered Question 29 What is output by the following code? for(int i- 1; i < 2; i++) for(intj-0; j<3; j++) System.out.print+i+j+” 0 11 12 20 21 22 10 11 12 13 20 21 22 23 10 11 12 13 10 11 12 Show transcribed image text 0/1 pts nanswered Question 29 What is output by the following code? for(int i- 1; i
Expert Answer
Answer to 0/1 pts nanswered Question 29 What is output by the following code? for(int i- 1; i < 2; i++) for(intj-0; j... . . .
[Solved]Write Vhdl Code Controller B Write Test Bench C Write Ucf File Use State Diagram Q37290349
A. Write a VHDL Code for the Controller
B. Write a Test Bench
C. Write a UCF File
Use this State Diagram


Design Description and Requirements You will implement a simplified controller (based on a synchronous FSM) for a vending machine that sells candy bars for 25 cents. The vending machine accepts nickels, dimes and quarters and dispense candy bars and change (nickels and dimes). Design this circuit using the FSM approach Estimate the mumber of FFs that are required The user inputs are: nickelin, dime见quarter.黒indicating the type of coin that was deposited Your design will include a 1 Hz cll and reset (asynchronous). The outputs are: candy..out, nickelout, dime out The state diagram for the xending machine controller is presented in Figure 1 (and Appendix 1). The states are: stO (initial state), st5, st10, st15, st20, st25, st30, st35, st40, st45 (indicating the amount of credit) To simplify the state diagram, the following notation was used: ni-nickel in. di-dime in. qi-quarter in, no-nickel out, do-dime out, co-candy-Out. In states s25, s30 and st35 a candy bar is dispensed (co#1), accompanied by a nickel and dime in the last two states (no=,1′, do= Note: The machine will stay in state sto, if no coins are inserted. It is similar for st5, st10, st15, st20
Expert Answer
Answer to A. Write a VHDL Code for the Controller B. Write a Test Bench C. Write a UCF File Use this State Diagram … . . .

