The block of statements below the line of stars

Assignment Help Python Programming
Reference no: EM13168522

The block of statements below the line of stars is where I need help correcting. The true line that needs to be corrected is p = add((getX(k),getY(r))), it needs to give points of the path using the block of information. I have somthing which I know is correct below.

if can please help correcting that line ( p = add((getX(k),getY(r))));

def maxParagraphLength (paragraphs):

return max ([len (paragraph) for paragraph in paragraphs])

def countParagraphsWithCommonWords (paragraphs, commons, length):

return len ([l for l in [len ([word for word in paragraph if word in commons]) for paragraph in paragraphs] if l >= length])

def getX(x):

return 10.0 + 0.8*x

def getY(y):

return 410.0 - 0.08*y

window = Canvas()

window.setTitle ('Assignment 2 [Gonzo]')

window.setWidth (421)

window.setHeight (421)

window.setBackgroundColor('yellow')

***********************************************************************************

p = Path

for k in range(maxParagraphLength (paragraphs)+1):

r = countParagraphsWithCommonWords (paragraphs, commons, k)

p = add((getX(k),getY(r)))

#add.setFillColor('red')

#p.setBorderWidth(0)   

window.add()

Reference no: EM13168522

Questions Cloud

0.4 of students are women and gpa for women : 0.4 of students are women and gpa for women has mean of 3 and sd 0.8; Gpa for men has mean of 2.5 and sd of 1.0. a sample size of 100 students which consist 40 women and 60 men.
Calculate the number of fungal particles : A student wishes to establish experimentally the number of fungal particles in a fixed volume of air. He uses a liquid medium suitable for the growth of most fungi and exposes the liquid to air in a rectangular container of dimensions 15 cm × 15 c..
Fortran-77 to sort an array of numbers entered : Write a program in Fortran-77 to sort an array of numbers entered from the keyboard and then using binary search, search for a number in the array.
What is the mass of a block of graphite : A block of Iron has a mass of 483 g. What is the mass of a block of Graphite that has the same volume as the block of Iron?
The block of statements below the line of stars : The block of statements below the line of stars is where I need help correcting. The true line that needs to be corrected is p = add((getX(k),getY(r))), it needs to give points of the path using the block of information. I have somthing which I kn..
What would be the total revenue at the breakeven point : What are the expected benefits of the implementation of an effective system of internal controls for an organization and what would be the total revenue at the breakeven point?
Explain what mass of co2 and h20 would be produced during : What mass of CO2 and H20 would be produced during the combustion analysis of 0.1674 g of the cobalamin?
The program calls a function called getgrades : The program calls a function called GetGrades that will read in grades from the keyboard, the number of grades should also be input by the user.
Write a program that calculates net pay : Write a program that calculates Net Pay. It should do this by calling a function called CalNetPay that calculates and returns Net Pay when given the hours worked and the hourly pay rate. The main function should pass the hours worked and pay rate ..

Reviews

Write a Review

Python Programming Questions & Answers

  Segment that prompts the user for an arithmetic operator

The variables x and y refer to numbers. Write a code segment that prompts the user for an arithmetic operator and prints the value abtained by appying that operator to x and y.

  Program that creates a dictionary containing

Write a program that creates a dictionary containing the U.S. states as keys and their capitals as values. The program should then randomly quiz the user by displaying

  Output the starting position and length

X Strings: Input a string. Output the starting position and length of the first occurrence of the longest substring of capital Xs in that string. The first letter is in position 1.

  Program to do the enciphering

Write a program to do the enciphering. It should prompt the user for a message, and print out both the entered message and its corresponding ciphertext.

  Write a program that counts the frequencies of each word

Write a program that counts the frequencies of each word in a text, and output each word with its count and line numbers where it appears. We define a word as a contiguous sequence of non-white-space characters.

  Specializes in solving the equations ax=b by doolittle''s dec

Write a  program that specializes in solving the equations Ax=b by Doolittle's decomposition method, where a is the HIbber matrix of arbitrary size nxn

  Write a program to receive a series of numbers

Write a program to receive a series of numbers (including decimal) from the user until enter key is pressed. Process the input data and display number count, sum and average. Use proper data type and format.

  Input a temperature as a floating point

Your program should input a temperature as a floating point number with an appended unit letter. It should then print the temperature in all four of the units above

  The computer game function collision

The computer game function collision () checks whether two circular objects collide; it returns True if they do and False otherwise. Each circular object will be given by it's radius and the (x,y) coordinates of it's center.

  Function by sum of sines

code the program using an editor (DO NOT COMMAND LINE THE PROGRAM) and show the results

  Function should return a dictionary

Write a function numOccur(s), where s is a string; the function should return a dictionary whose keys are the 26 ascii letters abcdefghijklmnopqrstuvwxyz

  Implement functions for insertion sort

Implement functions for Insertion sort and bubble sort in python programming language and a function that calculates the function execution time.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd