Question

Python code

dojo_rev.png

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Python code
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Python Code

    (Please HelpA group of statisticians at a local college has asked you to create a set of functions that compute the median and mode of a set of numbers. Define these functions, median and mode, in a module named stats.py. Also include a function named mean, which computes the average of a set of numbers. Each function should expect a list of numbers as an argument and return a single number. Each function should return 0 if the list is empty. Include a main function...

  • Python code

    dojo_rev.pngPlease help me solve this. Thanks

  • Python code

  • Python code

    Write a Python program that takes the value of n from the user and calculates the value of S using the following equation:S = 1! - 2! + 3! - 4! + 5! - 6! + ……..  n!Here, the value of n should be a positive (n>0) integer. If the user gives a negative input or zero, then print “Invalid Input!”. Also, print the sentence “End of program.” in the last line no matter what the input is.---------------------------------------------------------------------Sample Input 1:4Sample Output 1:Value of...

  • PsuedoCode into Python code

    Prompt the user for the starting balance and store it in a variable called balance.Prompt the user for the number of trades to perform and store it in num_trades.Using num_trades, set up a for-loop and for each trade do:if this is the first iteration of the loop:Prompt the user for the number of shares to buy and store it in num_shares.else:Prompt the user for the type of trade that he/she wants to perform and store it in action.Prompt the user...

  • Python Code Help

    The Scenario:You previously created a point-of-sale system for a beach side restaurant, or if your instructor told you to, perhaps another business that needed a point-of-sale system.  In this assignment you’re being asked to extend that assignment because printing a receipt only to the screen isn’t going to do the trick if your customer is an individual that likes to take their receipts with them to compare against their credit card statement each month.Behaviors of your ApplicationYour application will continue...

  • write by python code and screenshoot the python code for me. thanks The Problem: You are...

    write by python code and screenshoot the python code for me. thanks The Problem: You are to design a Calorie Intake Assistant tailored to the user’s personal characteristics. The assistant will initially ask the user for his/her gender, name, age in years, height in cm and weight in kg. Based on these, the assistant will calculate the recommended daily calorie intake (RDCI) using the Mifflin – St Jeor formula[1], which is also shown to the user: Mifflin – St Jeor...

  • Help with Python code. Right now I'm creating a code in Python to create a GUI....

    Help with Python code. Right now I'm creating a code in Python to create a GUI. Here's my code: #All modules are built into Python so there is no need for any installation import tkinter from tkinter import Label from tkinter import Entry def calculatewages(): hours=float(nhours.get()) nsal=float(nwage.get()) wage=nsal*hours labelresult=Label(myGUI,text="Weekly Pay: $ %.2f" % wage).grid(row=7,column=2) return Tk = tkinter.Tk()    myGUI=Tk myGUI.geometry('400x200+100+200') myGUI.title('Pay Calculator') nwage=float() nhours=float() label1=Label(myGUI,text='Enter the number of hours worked for the week').grid(row=1, column=0) label2=Label(myGUI,text='Enter the pay rate').grid(row=2, column=0)...

  • Image histogram code in python?

    In this exercise you should write a Python function that computes the histogram of an intensity (gray scale) image. Do not use specifific Python functions for histogram computation (like hist or imhist). Create a new function my_hist and start with the following lines: function [h] = my_hist(im) % H = MY_HIST(IM) computes the histogram for the intensity % image IM (with values from 0 to 255) and returns a vector H % with 256 dimensions % get the image size:...

  • Python code that sorts books

    class Book:    def __init__(self,id,bookName,authorName,nextNode=None):         self.id = id         self.bookName = bookName         self.authorName = authorName         self.nextNode = nextNode    def getId(self):        return self.id     def getBookName(self):        return self.bookName    def getAuthorName(self):        return self.authorName    def getNextNode(self):        return self.nextNode       def setNextNode(self,val):         self.nextNode = val   class LinkedList:    def __init__(self,head = None):         self.head = head         self.size = 0     def getSize(self):        return self.size    def AddBookToFront(self,newBook):         newBook.setNextNode(self.head)         self.head = newBook         self.size+=1     def DisplayBook(self):         curr = self.head        while curr:            print(curr.getId(),curr.getBookName(),curr.getAuthorName())              curr = curr.getNextNode()    def RemoveBookAtPosition(self,n):         prev = None         curr = self.head         curPos = 0         while curr:            if curPos == n:                if prev:                     prev.setNextNode(curr.getNextNode())                else:                     self.head = curr.getNextNode()                 self.size = self.size - 1                 return True                  prev = curr             curr = curr.getNextNode()              curPos = curPos + 1          return False     def AddBookAtPosition(self,newBook,n):         curPos = 1         if n == 0:             newBook.setNextNode(self.head)             self.head = newBook             self.size+=1             return         else:             currentNode = self.head            while currentNode.getNextNode() is not None:                if curPos == n:                     newBook.setNextNode(currentNode.getNextNode())                     currentNode.setNextNode(newBook)                     self.size+=1                     return                 currentNode = currentNode.getNextNode()                 curPos = curPos + 1             if curPos == n:                 newBook.setNextNode(None)                 currentNode.setNextNode(newBook)                 self.size+=1             else:                print("cannot add",newBook.getId(),newBook.getBookName(),"at that position")    def SortByAuthorName(self):        for i in range(1,self.size):             node1 = self.head             node2 = node1.getNextNode()            while node2 is not None:                if node1.authorName > node2.authorName:                     temp = node1.id                     temp2 = node1.bookName                     temp3 = node1.authorName                     node1.id = node2.id                     node1.bookName = node2.bookName                     node1.authorName = node2.authorName                     node2.id = temp                     node2.bookName = temp2                     node2.authorName = temp3                 node1 = node1.getNextNode()                 node2 = node2.getNextNode()     myLinkedList = LinkedList() nodeA = Book("#1","cool","Isaac") nodeB = Book("#2","amazing","Alfred") nodeC = Book("#3","hello","John") nodeD = Book("#4","why","Chase") nodeE = Book("#5","good","Mary") nodeF = Book("#6","hahaha","Radin") myLinkedList.AddBookToFront(nodeA) myLinkedList.AddBookToFront(nodeB) myLinkedList.AddBookToFront(nodeC) myLinkedList.AddBookAtPosition(nodeD,1) myLinkedList.AddBookAtPosition(nodeE,1) myLinkedList.AddBookAtPosition(nodeF,1) myLinkedList.RemoveBookAtPosition(2) myLinkedList.RemoveBookAtPosition(2) myLinkedList.DisplayBook() myLinkedList.SortByAuthorName()print(myLinkedList.getSize())...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT