python Module Creation - Miles Per Gallon You will be using modules for the rest of your career. They provide an excellent depository of reusable code. This assignment will give you a very small idea of what a module is to be used for. What is expected of you: Create a module that calculates Miles Per Gallon of a vehicle. You must use error checking to ensure ONLY numbers are allowed. Please feel free to add to this assignment by using your imagination (as an example, under-inflated tires detract from mileage).
Q: Analyze the code below: for i in range(1,): for j in range ( i+1): print end= Output: 1 2 2 3 3 3 4…
A: #Program: # Outer loop will print number of rows for i in range(0,6): # Inner loop will print…
Q: Questions 1. What is prime objective of software engineering? Define software engineering paradigm?…
A: The solution to the given question is: 1) First main objective of software engineering is develop…
Q: Complete the code to show the result of the 10 factorials. Do not change anything on the codes Just…
A: According to Question the changes for line 5 and line 8 are below: Line 5 : f*=k and line 8: f=1…
Q: 5. What is the difference between an instance variable and a static variable?
A: As per bartleby Guidelines we did 1 Answer only
Q: Give a definition of Graph and show examples of a directed and an undirected graphs in roster set…
A: We need to define a directed and undirected graph. Also, need to define the degree of these graphs.…
Q: d. Determine the corresponding layer of the OSI model to the following duties: i. Carrying…
A: Ans iii) Dividing the message into manageable segments : Transport layer as in the transport layer…
Q: The inorder traversal of a BST is always the same as the inorder traversal of an AVL tree True False
A: Answer :-- option 1) True
Q: art 1::-
A: I have written the code below for Part 1. as mentioned in the question:
Q: QUESTION 2 Which statement has a similar logic to switch-case? multiple if-else multiple if for O…
A: Which statement has a similar logic to switch-case? > multiple if-else [RIGHT] > multiple if…
Q: 7. How many times does the code snippet given below display "Loop Execution"? for (i = 0; i != 9;…
A: Please find the answer below :
Q: Given the following list: names =["Yoongi", "Seokjin", "Namjoon", "Tachyung", "Jungkook"] %3D What…
A: The list is a data structure that stores various types of data separated by commas. the indexes…
Q: Problem 1 (CO5): Nonregular Language Use the pumping lemma to demonstrate that L₁, L2, L3 and L4 is…
A: (a) L1 = {0i1j where i > j}To show that L1 is not regular using the pumping lemma, we assume that…
Q: i. List all the internal nodes ii. What is the height of International? iii. Indicate the right…
A: Given Tree :
Q: exitle); 1. What the variable myThread is referring to? 2. What the constant "I" is geferrig te? 3.…
A: Note: As per our guidelines we can able to solve only three subdivisions. So, please repost the…
Q: Give a definition of Graph Embedding, Planar Embedding. Is the following graph a planar graph?…
A:
Q: NetBios Sdn. Bhd. is a local engineering company that has planned to expand their services and…
A: the answer is an given below ;
Q: i. Compute the DFS of the graph Construct the DFS spanning tree indicating the back edges
A:
Q: If 5 bits are used to code (count to) only 28 decimal values then the number of unused binary codes…
A: So the answer for Part A) will be 4 and part B) will be 8 Explanation below:
Q: In graph traversal, Depth-First Search (DFS) order is “aggressive" in the sense that it examines…
A:
Q: Analyze the code below: for i in range (1, _1 ): for j in range (2, i+1): print(_3_, end=_4) Output:…
A: Explanation In a given section of code, nested for loop along with the range() function is used to…
Q: In a simplex communication by using UTP cable, which type of change can reduce the received signal…
A: A simplex communication channel only sends information in one direction. In simplex communication…
Q: 6. What is the difference between remove and clear in ArrayLists.
A: The clear() method removes all the elements of a single ArrayList. It's a fast operation, as it just…
Q: • Given the interface (header file) of a parametroc Deque below, write its implementation. Listing…
A: Solution: The Deque class provides a constructor and a destructor, as well as methods to…
Q: The time complexity to find an element in a BST is always O(log n) True False
A: Given:
Q: Using the figure in previous problem, list each entity and state what foreign key, if any, would be…
A: In the previous answer, we have identified the business rules. Now we will identify the foreign key…
Q: for i in range
A: ANSWER: Python Range:
Q: How many times will the following loop run? int i = 10; do { cout << i; i=i++; } while (i < 10); .…
A: C++ programming language is an object-oriented programming language, that's used to develop web…
Q: The time complexity to add an element to a Red-Black tree is O(log n) True False
A: Red-black tree is an self balancing tree which means at the time of insertion or deletion the tree…
Q: 5. Random Number Frequencies Write a program that generates 100 random numbers between 1 and 10. The…
A: In this Python program, aim to explore and analyze the distribution of 100 randomly generated…
Q: 2. Use the 8 Golden Rules to compare Uber Eats, Door Dash and GrubHub.
A: SUMMARY: - hence we discussed all the points.
Q: Only 17
A: In step 2, I have provided definition of constructor and how constructor is different from other…
Q: (a) The following C program in Figure 1 process information from 1-dimensional array named calculate…
A: Given:
Q: QUESTION 4 Which of the following is NOT a loop structure? do..while switch..case while for QUESTION…
A: (b)Switch..case Explaination - Switch case is not a loop structure because for, while and do while…
Q: Draw the logic network for g (x1, x2, x3) = x1. (x2 + x3) Write the truth table for g. Create…
A: For the function G Let us rename x1 as a x2 as b x3 as c the function g(a,b,c) = a.(b+c') The…
Q: Change following to Sign + Magnitude: ( -76)10 Change following to Ones Complement. (-76)10 Change…
A: The Most significant bit which is the left most bit will be used to store the sign of number 0…
4
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Python task: Task OverviewYour task is to implement a variation of the classic word game Hangman, which involves playersguessing the letters in a word chosen at random with a finite number of guesses. While there arealternate versions such as category Hangman and Wheel of Fortune, which involve playersguessing idioms, places, names and so on, we will be sticking with the traditional version.If you are unfamiliar with the rules of the game, please read the following before starting:http://en.wikipedia.org/wiki/Hangman_(game). You can also play an online version here. Don’tbe intimidated - You’ll be given some skeleton code to get you started, it's easier than it looks! You will implement a function called main that allows users to play an interactive hangman gameagainst the computer. The computer should pick a word, and players should then try to guess lettersin the word until they win or run out of guesses.Here is the overarching behaviour we expect:1. The program should load a list of…Python Project: Problem #1: How much should I study outside of class?Issue:Your fellow students liked the previous version of study hour’s application andwant to expand it again by adding the features listed below.Minimum Study Hours per Week per Class Grade15 A12 B9 C6 D0 FProject Specifications:1. The program asks the user their name, employee id, and department.2. The program also asks the user who they are creating the report for, their employeeid, and the department they work in. (hint #1 & 2 are instances of a class – A classmust be created and used within the program)3. The menu driven program has the following options:A. Determine Hours to StudyB. Determine GradeC. Display Averages and TotalsD. QuitThe user can select any menu option in any order they want.For example:o The user can start the program run option A, then option C, then option B,then option D.o They restart the program, run option C, then D.o They restart the program, run option A, then D.o They restart the…use pycharm/python
- Java programming Project 1 had all the calculations occurring in the main program. For this project, you are to modularize your program. Use functions as much as you can and use Arrays for your menu. be sure that the names you come up with for your modules are verbs and follow case conventions. Please do not create a function for every single input or calculation! Programmers group statements together that accomplish one task, such as getting input from the user and name them appropriately, such as getInput. Make sure every input display cost or money owed. The results of running your program should be identical to the results you obtained in Project 1 (either your original version or a corrected version if there were errors). If the money given is not enough, make sure you loop back or with decision structure to ask for more money. This is project 1: // Project 1 //// This program is designed to take a customers food order and generate a recipt displaying their purchase, the…Looping is an essential component of any script or application written in Python. Looping allows you to run repeated operations without copying code. This Discussion Board is designed to help illustrate each loop type and when to use a particular loop type. Select either the For or While loop and provide the following in your Discussion Board post: A description of what the loop does An example of why you would use the loop you selected over the other Remember to use a reference to your learning materials or an outside source in at least one post each week.JAVA LANGUAGE Body Mass Index Version 2.0 by CodeChum Admin Recall that according to the National Heart, Lung, and Blood Institute of the National Institutes of Health, body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. It is used to monitor one's health by determining whether one is underweight, overweight, has normal weight or is obese. It is computed based as follows (when using standard weight in pounds and height in inches): BMI = 703 x (weight/(height2)) Furthermore, people with BMI scores that are less than 18.5 are said to be underweight. Those with scores between 18.5–24.9 (inclusive) are of normal weight. Those with scores between 25–29.9 (inclusive) are said to be overweight. And those with scores 30 or higher are obese. Input The input is composed of two positive integers representing the weight in pounds and the height in inches. 140·65 Output A single line containing two values: the computed…
- Don't reject my question under complex one Computer Science Create a Windows Form Application project. with C#, using random values in an array or loop. The application should have a button and a picture box. Each time the button is clicked, a random number 1 through 6 is generated and the corresponding die image is displayed in the picture box.LANGUAGE: C++ This is a free choice program to demonstrate a 2D array. Please don’t choose the totally obvious choices such as tic tac toe where you can obtain the code directly from online. If you were going to do tic tac toe you would have to modify the game or make it totally unique from code that is online. Preferably, I would like you to make something zany up instead, it doesn’t have to be overly difficult, it can actually be pretty basic (but not ridiculously basic). For example, The 2D array could represent a minefield and you might have a game to pick (row,col) locations to win a prize without picking one that has a mine bomb in it, or, you could have a certain number guesses to find a hidden treasure, or advance to next round, or guess the right answer or etc. You could try to solve a mental puzzle. You could be a game piece moving around on the board. You could do something requiring someone to pick out matching items in the array to win, etc. You could have two…Scenario You are tasked to write a Python module named after you to help create score cards to students in a class. The following seven subject should show on each student’s score card: Algebra, English, Statistics. Our program should first ask for a student's name, then her/his scores for the three subjects in the order shown above. This process will be repeated until all the students’ scores are entered. Note that there are four (4) students and their names are the AB, CD, EF, GH. Use Python ASCII/UTF-8 functions chr and ord to generate the names; do not input the names manually. (Hint: You might need to use a dictionary and a function to accept all the input.) Create another function to handle the printing as follows: When the printing function is called, a single student name is passed to it as an argument. (e.g., function3(AB)), the function then prints the student’s name and his/her scores in two columns, one for the subjects and one for the scores. The subject and the…
- PLEASE CODE IN PYTHON Problem DescriptionBoring is a type of drilling, specifically, the drilling of a tunnel, well, or hole in the earth. With some recent events, such as the Deepwater Horizon oil spill and the rescue of Chilean miners, the public became aware of the sophistication of the current boring technology. Using the technique known as geosteering, drill operators can drill wells vertically, horizontally, or even on a slant angle. A well plan is prepared before drilling, which specifies a sequence of lines, representing a geometrical shape of the future well. However, as new information becomes available during drilling, the model can be updated and the well plan modified.Your task is to write a program that verifies validity of a well plan by verifying that the borehole will not intersect itself. A two-dimensional well plan is used to represent a vertical cross-section of the borehole, and this well plan includes some drilling that has occurred starting at (0, −1) and moving…You can use any C# compiler or the method you already know. The following table contains quarterly sales figures for five (5) departments: Quarter 1 Quarter 2 Quarter 3 Quarter 4 Total Department 1 750 660 910 800 Department 2 800 700 950 900 Department 3 700 600 750 600 Department 4 850 800 1000 950 Department 5 900 800 960 980 Total Design and write a Windows program/module named SalesAnalysis that will: Declare a two-dimensional integer array named sales – (Note: you have 6 rows and 5 columns) - that will hold the 4 quarterly sales for 5 departments Populate the first four columns for the 5 departments using the data in the preceding table. Contain a loop to compute and populate the total column. Store each department’s total in the array as it is being computed. Contain a loop to compute and populate the total row. Store each quarter’s total in the array as it is being computed.…write in assembly language Divide by two numbers In this assignment, you are required to make an application using assembly code that takes two numbers from the user and returns the result of dividing the first number by the second number. Important notes: 1- You should allow the user to Enter to digits number "For the first number only" 2- You should allow two-digit results if necessary. Stretch goal "optional": Handle the remain of the division process and print it on the screen. Submission: Provide two files (.asm and screenshot). Use your university ID for files naming. Submission status