Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Type Error: 'in' object is not callable
Post: RE: Type Error: 'in' object is not callable

Thanks guys :) Do basically if I change the name of the returned method it'll work in the assert statement
nman52 General Coding Help 3 3,382 May-01-2021, 11:03 PM
  Star Thread: Type Error: 'in' object is not callable
Post: Type Error: 'in' object is not callable

import statistics as s class stats: def mode(self): self.mode = s.mode(self.value) return(self.mode) def median(self): self.median = s.median(self.value) r...
nman52 General Coding Help 3 3,382 May-01-2021, 03:41 AM
    Thread: Return mean() of dict
Post: Return mean() of dict

Hi everyone, I've solved this problem #7 using pandas, but it specifically asks to do it by hand. Output:Problem 7: mean_attack_per_type Write a function called mean_attack_per_type that calculates ...
nman52 Homework 0 2,021 Apr-18-2021, 10:47 PM
    Thread: Problem 6.b
Post: RE: Problem 6.b

I've finally solved this problem. Please take a look and let me know what you think and where I can improve :) Many thanks! def longest_line_length(file): with open(file, 'r') as file:...
nman52 Homework 4 2,467 Dec-26-2020, 01:08 PM
    Thread: Search Engine
Post: Search Engine

Can anybody tell me what are the steps to create a search engine such as google? I've read that it involves using python libraries such as beautiful soup/scrapy to crawl through different websites. An...
nman52 General Coding Help 1 53,883 Dec-16-2020, 09:21 AM
    Thread: Problem 6.b
Post: RE: Problem 6.b

What I have so far: from itertools import groupby def longest_line_length(file): file = open(file) file = "{}".format(file.read()) print(file) if file is None: return No...
nman52 Homework 4 2,467 Nov-29-2020, 04:43 AM
    Thread: Problem 6.b
Post: Problem 6.b

Hi everyone, I feel like I'm close to an answer for this one.. but not quite. Would groupby be the way to go here? Source: https://courses.cs.washington.edu/course...part1.html Problem 6.b: Longes...
nman52 Homework 4 2,467 Nov-29-2020, 04:35 AM
    Thread: Problem 5
Post: RE: Problem 5

Thank you ! :)
nman52 Homework 6 2,540 Nov-29-2020, 04:25 AM
    Thread: Problem 5
Post: RE: Problem 5

from itertools import groupby def compress(z): for key, group in (groupby(z)): print(key,len((list(group)))) string= [zip(key, len((list(group)))] return(string)This is...
nman52 Homework 6 2,540 Nov-27-2020, 01:44 PM
    Thread: Problem 5
Post: RE: Problem 5

I've figured out the out of index issue, doesn't look pretty but.. def compress(z): count = 1 list = [] i = 0 print(len(z)) for value in z: while ...
nman52 Homework 6 2,540 Nov-23-2020, 06:24 AM
    Thread: Problem 5
Post: Problem 5

Hi everyone, I'm having some issues with problem 5 on this site: https://courses.cs.washington.edu/course...part1.html So far, I've tried to implement a loop function, but I'm getting a string "out ...
nman52 Homework 6 2,540 Nov-23-2020, 06:16 AM
    Thread: Tuples & Functions
Post: RE: Tuples & Functions

Thank you for post. I was aware of the "hints" though they weren't very helpful to say the least. In regards to your code, I'm having difficulty understanding the def digits(num) function. def dig...
nman52 Homework 7 3,295 Nov-14-2020, 10:50 AM
    Thread: Tuples & Functions
Post: RE: Tuples & Functions

My solution. Open to recommendations. def count_divisible_number(n,m): x_list = [] divisible = [] returnable = [] for digit in str(abs(n)): ...
nman52 Homework 7 3,295 Nov-09-2020, 03:00 AM
    Thread: Tuples & Functions
Post: RE: Tuples & Functions

I think I've found something online: Will keep you guys updated. https://www.kite.com/python/answers/how-...0iteration.
nman52 Homework 7 3,295 Nov-09-2020, 01:16 AM
    Thread: Tuples & Functions
Post: Tuples & Functions

Hello, I'm on Problem 1 from this website: https://courses.cs.washington.edu/course...part1.html The premise is simple, but I'm having difficulties with the syntax. The objective is to build a fu...
nman52 Homework 7 3,295 Nov-09-2020, 12:27 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020