In python Write a software that asks the user for floating point values repeatedly in main until the user presses the Enter or Return key on the keyboard. A list contains the floating point values. The list is given to the user-defined function Avg by the main programme (). The function Avg() computes the list's members' average value and counts the values that are higher than the average. The average, the number of values that are greater than the average, and the actual values that are greater than the average are all displayed by the Avg() function. You are not permitted to resolve this issue using any built-in tools or techniques. Using a numbered list with the statements listed in the order they are executed,
Q: Consider the following scenario: your organization aims to establish a self-contained server room…
A: All data storage, cabling infrastructure, and other key devices are located in or kept in the server…
Q: When people talk about "quantum computing," what do they mean, and how does it function?
A: When performing operations, qubits' quantum state is used in a process known as quantum computing.…
Q: If you have a file named Bevco.xls, what exactly are you supposed to do with it?
A: Explanation XLS, also known as Binary Interchange File Format, was created by Microsoft for use with…
Q: What are the main differences between real-time and delayed responses?
A: Communication Methods: Asynchronous and Synchronous In contrast to asynchronous communication,…
Q: einsteineruploading up to get together with. In many aspects, a contemporary Turkish individual…
A: Tricking people using automation: "No," it is not feasible to trick people using a mechanical Turk…
Q: The term "electronic commerce" refers to the sale of electronic goods.
A: Alteration in the time span of the network The process by which users are moved from an old network…
Q: What does it imply, precisely, when we talk about "pipelining" instructional materials? The data…
A: Let's check out the answer. Modern microprocessors, microcontrollers, and CPUs employ the method of…
Q: Question Mahv.... Explain the concept of a contiguous block of memory. 2. Explain how the…
A: INTRODUCTION: Memory is an electrical storage space that a computer uses to temporarily store data…
Q: Question 1: Draw the Venn Digrams for the following combincations of the sets X, Y and Z: (c)…
A: a) We will get the intersection between the three sets b) Y - Z will give us Y We will get a…
Q: For network modifications in big businesses, how do you normally gain the go-ahead
A: Introduction: During the whole of the greatest of new enterprise experiences, every business…
Q: Examine your place in the system. What is the purpose of the value chain? What do you do for a…
A: The value chain consists of a number of processes that are utilised to convert input into output…
Q: PLEASE SHOW ALL THE WORK!! THANKS IN ADVANCE A Christmas tree is decorated with balls that are…
A: Your answer is given below with an explanation.
Q: Certain risks may be associated with the SSTF disc scheduling method.
A: An operating system is a programme that runs application programmes and serves as a communication…
Q: e. Which of the following is not an I-type instruction? i. bne St1, St2, Label ii. slti St1, $t2, 3…
A: We need to find correct option regarding the given Mips statements.
Q: Write a program code in Java Write a program to compute the ideal weight for both males and…
A: Here is the java program of the above problem.
Q: Why is it necessary to have both a secret key and a public key in cryptography?
A: the distinction between a cryptographic secret key and a public key is as follows: -the…
Q: When did the first handheld computer appear?
A: Computers on Wheels: The Osborne 1 was the first portable computer. In 1981, it became available…
Q: Is there a pattern to the Hamming code? Explain
A: Extra error-checking bits (parity bits) are interspersed with the actual information bits in…
Q: When did the first home computer become on the market?
A: A personal computer (PC) is a multifunctional computer that is compact, powerful, and affordable…
Q: need to write the code in assembly for 89c51(or any similiar controller)
A: The Structure or Syntax of the 8051 Microcontroller Assembly Language is discussed here. Each line…
Q: A fictitious setting, JUNGLE, is being described in PDDL terminology. There are three predicates in…
A: Planning Domain Definition Language: PDDL successfully defined planning-domain and…
Q: Even the simplest projects may benefit from using the Spiral Model for planning and management…
A: Introduction: The spiral model, which is used for risk management in the systems development life-…
Q: It would be great to hear your opinions after reading papers presented at prestigious conferences…
A: Pipeline disputes Each functional unit in a pipeline processor architecture operates independently…
Q: Assume that every 18 months, the number of CPU cores accessible is doubled. How much more off-chip…
A: Given that every 18 months, the number of CPU cores accessible is doubled. We need to find off-chip…
Q: Examine the idea of abstraction by contrasting it with several CS-based examples. Explaining the…
A: Abstraction: In order to reduce something to a set of fundamental qualities, something must be…
Q: Are there any ways that may assist lower page table shadowing's overhead?
A: In this question we need to explain whether it is possible to reduce (lower) the overhead of page…
Q: Write a C program that utilizes the ComplexNumber data type defined below, ----- Start of Data…
A: According to the Bartleby guideline, we are supposed to answer only first 3 part of question at a…
Q: Assume that the sender and receiver have a constant roundtrip delay and that the sender is aware of…
A: The time required for a data packet to be delivered to a particular place , and the…
Q: Having the ability to do local computations is a key feature of an intelligent terminal.
A: Terminal that can process, transmit, and relocate from a vast system. The gadget normally has a…
Q: Provide a high-level explanation of the distinctions between interlacing and progressive scan, as…
A: When it comes to the transmission of video, what's the difference between interlacing and…
Q: What method do you use to analyze the information?
A: Introduction Data gathering, cleansing, & organization are common actions included in data…
Q: Experts will downvote you if you don't provide a satisfactory response. What is meant by the term…
A: The Solution is in the Steps Below The picture displays a straightforward diagrammatic overview of a…
Q: Is it better to utilize a command-line interface or a graphical user interface? Why?
A: A command-line interface (CLI) is a text-based or command-based user interface (UI) in which the…
Q: Find an appropriate website or social networking site that fits each of the following criteria.…
A: We must properly match the sites. Choices include social media website. an open website. website for…
Q: Compare and contrast the RISC and CISC architectures used in microprocessors.
A: We need to compare and contrast RISC and CISC.
Q: It is necessary to contrast the ideas of virtual memory and virtual machines. How much do the goals…
A: Explanation: It's important to note that virtual "memory" and virtual "machine" are not synonymous.…
Q: Please help me with this using java. And comment the code The following is some code designed by J.…
A: Main.java - public class Main { //main method definition public static void main(String[]…
Q: For what reasons was the UNIVAC the first computer to be made available for business purposes?
A: As a direct consequence of this, the very first computer that was made available for use in a…
Q: Firewall hardware and software are also widely used to regulate and protect networks like the…
A: Firewalls : A firewall is a network security system, either hardware or software-based, that…
Q: WITH LINUX DO THE FOLLOWING: Please write a shell script called "greeting" that displays a greeting…
A: A shell script is a computer program designed to be run by the Unix/Linux shell which could be the…
Q: Figure out the right way to describe computer output that is written to an optical medium rather…
A: A microfiche is a sheet of flat film with dimensions of 105 x 148 mm, approximately the same as ISO…
Q: Why do we need to translate source codes and break up large programs into smaller ones?
A: Taking into consideration what you've asked, The modular layout is a software design that stresses…
Q: Some of the considerations that need to be addressed in creating an information system architecture…
A: A computer is a digital electronic machine that can be programmed to automatically perform a series…
Q: Determine a Turing machine for the language L = {ww | w is a string of 0s and 1s} where w is the…
A: Given language is, L={ww | w is a string of 0s and 1s} Set of input alphabets= {0, 1}
Q: Why does the following code segment throw an exception? Thread th; th.Name = “Duck?
A: According to the information given:- We have to define why does the following code segment throw an…
Q: Watchdog clocks are often used in embedded systems for a variety of reasons.
A: Watchdog timer (WDT) is a safety device that brings a crashed embedded system back to life. Watchdog…
Q: This variable tracks the total number of source-level statements as well as I/O activities.
A: AlgorithmAn algorithm is a well-defined set of instructions that is mostly used to solve problems.…
Q: Construct an optimal binary search tree for five keys A, B, C, D, E with probabilities p1 = 0.1, p2…
A: “Since you have posted a question with multiple sub parts, we will provide the solution only to the…
Q: What exactly is clustering, and how does it function? What are its applications in data mining, and…
A: A cluster is a collection of things that fall under a single class. For instance, there may be…
Q: Write your answer based on the tree given on the left side. (11) 2 7 5 6 3 1 Write a function for…
A: Tree Traversal: Algorithm of In-order: First, traverse left subtree which means calling the…
Step by step
Solved in 4 steps with 2 images
- python exercise: 1. Write a Python function called generate_quiz_question that takes a list of quiz questions (represented as tuples of the question and answer) as input and returns a randomly selected question from the list. The function should also prompt the user to enter their answer to the question, and then check whether the user's answer is correct or not. If the user's answer is correct, the function should return True. Otherwise, it should return False.python exercise: 1. Write a Python function called generate_quiz_question that takes a list of quiz questions (represented as tuples of the question and answer) as input and returns a randomly selected question from the list. The function should also prompt the user to enter their answer to the question, and then check whether the user's answer is correct or not. If the user's answer is correct, the function should return True. Otherwise, it should return False. 2. Write a function is_palindrome(s) that takes a string s as input and returns True if s is a palindrome (i.e., reads the same backwards and forwards), and False otherwise 3. Write a Python function called get_top_students that takes the list of dictionaries as input and returns a dictionary containing the name and GPA of the top two students in the list. Each dictionary has the following keys: "name", "age", "major", and "gpa".PYTHON CODING This function takes a list of points and then returns a new list of points, which starts with the first point that was given in the list, and then followed by points closest to the start point. Here is the function that needs to be created: def solution_path(points) : # insert code here return path Please use any of the following function to develop the solution_path function Distance function - calculates the distance between two points def distance(p1, p2) : distance = sqrt (((p1 [0] - p2 [0]) **2) + ((p1 [1] - p2 [1]) **2)) return (distance) Find_closest function - calculates the closest point to the starting point def find_closest(start_point, remaining_points): closest_distance = 99999 for coordinate in remaining_points: dist = distance(start_point, coordinate) if(dist < closest_distance): closest_distance = dist closest_point = coordinate return closest_point Path_distance function -…
- please code in python Assume you own a small cafeteria with very limited menu and you want to automate the orders. You have a list of menu items, a list with the price of these items. The number of elements in both lists should be the same. The program then asks the customer how many elements he wants from each item, then it should summarize the order of the customer and announce the price to pay. You can use the function from the previous exercise to check that the user enters a non-negative quantity each time.Assuming that we have:MENU_ITEMS=['karak','tea','coffee']PRICE_LIST=[2,1,5]You should get a sample run similar to that:How many karak do you want? 3How many tea do you want? 2.5Please enter valid quantity.How many tea do you want? -2Please enter valid quantity.How many tea do you want? 0How many coffee do you want? 1Your order is: - 3 karak - 0 tea - 1 coffeeYour total bill is 11 QAR.a- Write a Python function Salary_levels, that takes a list as an argument and returns the number of the high salaries (salary>=5000), the average salaries(1000<=salary<5000, and the low salaries (salary<1000). You can use the following list : salaries= [500,1070,1450,6500,9000,940,450,400,600,2750,1100,8400,1500,900,1200] b- Use the above function to print the counts of the high, average, and low salaries. N.B: the codes of parts a and b should be included in your answer.PYTHON CODING This function takes a list of points and returns the total distance of the path that results from traversing the points as ordered in the list The path should contain at least one point Use the developed functions below to create the function path_distance: 1. Function distance: def distance(d1, d2) : distance = sqrt (((d1 [0] - d2 [0]) **2) + ((d1 [1] - d2 [1]) **2)) return (distance) 2. Function find_closest: def find_closest(start_point, remaining_points): closest_distance = 99999 #declaring the closest distance with maximum value #iterating through all the points of the list for point in remaining_points: dist=distance(start_point,point) if(dist<closest_distance): # if the distance is minimum, update the closest_distance and closest_point closest_distance=dist closest_point=point return closest_point Use the above functions to develop the code for the function below: def path_distance(path) : #…
- Create a Python application that makes use of inputs, outputs, and sequence structures in Python. It must meet all of the following requirements: The application must create a list with exactly 10 items. The contents and type of list will be up to the student (e.g. Phone Brands, Types of Shoes, Shopping Apps). The application must first display the list after which the application must remove 5 random items from the list. The application must then show the updated list with 5 of the items removed. After this is done, the application must add 7 new items to the list. These items must be completely new and not the ones that were on the list initially. The application must then output the updated list with the added items. The application must then reverse the list and then display the updated list after it has been reversed. The application must create a tuple with exactly 10 items. The contents and type of tuple will be up to the student (e.g. Laptop Brands, Types of Pants, Game Apps).…plaese code in python You are tasked with creating a square grid of values in which each value only appears once in each column and once in each row (think like a Sudoku). Write a function called grid that inputs a list and outputs a square grid of values of that list in which each value only appears once in each column and once in each row. Specifically, one in which each row is the one above it shifted by one item. Your answer should be in the form of a list of lists, where each sub-list is a row of the square. For example: grid([1, 2, 3, 4]) -> [[1, 2, 3, 4], [4, 1, 2, 3], [3, 4, 1, 2], [2, 3, 4, 1]]Code in python Given a list, L, the function front_two creates a new list of length 2 out of the first two items in L as follows: In the new list, the second item becomes the first item, and the first item becomes the second. If L contains only one item, the first item in the new list should be the value None. If L is empty, both items in the new list should be value None. The function returns the new list. For example: Test Result L = ['a', 'b', 'c', 'd'] print(front_two(L)) ['b', 'a'] L = [] print(front_two(L)) [None, None] L = [5, 2] print(front_two(L)) [2, 5] L = [7] print(front_two(L)) [None, 7]
- Help with a lisp function (please post photos) A lisp function that generates a random day of the week, then displays a message saying that "Today is ... and tomorrow will be ...". For this purpose, create a global variable before the function containing the days of the week as a list. Then use the built-in function random first to generate a number between 0 and 6 (including). The expression (random) by itself generates a random integer. You can call it with one parameter to return a value within the range from 0 to the value of the parameter-1. For example, (random 10) will return a value between 0 and 9. Next, use the number generated at the previous step to retrieve the symbol for the day of the week from the list. Use the built-in elt function. We want the name of the day to appear capitalized. For this, extract the symbol-name of the day first, then apply the built-in function capitalize to it. Use the result in the princ function call, and do the same thing for the next day.…Using Python: This assignment requires the main function and a custom value-returning function. The value-returning function takes a list of random Fahrenheit temperatures as its only argument and returns a smaller list of only the temperatures above freezing. This value-returning function must use a list comprehension to create the list of above freezing temperatures.In the main function, code these steps in this sequence: create an empty list that will the hold random integer temperatures. use a loop to add 24 random temperatures to the list. All temperatures should be between 10 and 55, inclusive. Duplicates are okay. sort the list in ascending order. use another loop to display all 24 sorted temperatures on one line separated by spaces. 32 could be in the list. If it is, report the index of the first instance of 32. if 32 isn't in the list, add it at index 4. assign a slice consisting of the first six temperatures to a new list. Then print it. execute the custom value-returning…Common Time Zones Function Name: commonTimeZones() Parameters: code1( str ) , code2( str ) Returns: list of common time zones ( list ) Description: You and your friend live in different countries, but you figure there's a chance that both of you might be in the same time zone. Thus, you want to find out the list of possible time zones that you and your friend could both be in. Given two country codes, write a function that returns a list of the time zones the two countries have in common. Be sure not to include any duplicate time zones. If the two country codes do not have any common time zones, return the string 'No Common Time Zones' instead. Note: You can assume that the codes will always be valid. example test cases: >>> commonTimeZones('can', 'usa') ['UTC-08:00', 'UTC-07:00', 'UTC-06:00', 'UTC-05:00', 'UTC-04:00'] >>> commonTimeZones('rus', 'chn') ['UTC+08:00'] For this assignment, use the REST countries API…