Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: adding parts of a list
Post: RE: adding parts of a list

(Nov-17-2019, 08:37 AM)buran Wrote: you can use list comprehension scores = [int(score) for score in data[1:]] or map scores = map(int, data[1:5]) then grade = sum(scores) Thanks. It was able to add...
Eric7Giants Homework 4 2,731 Nov-17-2019, 04:37 PM
    Thread: adding parts of a list
Post: adding parts of a list

Hello. I'm working on a problem where there is a file that contains the name and 5 test scores for 5 students. I have to use python 2.7 even though I know it is obsolete. File: Quote:pchen72 50 71 55...
Eric7Giants Homework 4 2,731 Nov-16-2019, 08:40 PM
    Thread: Division problem
Post: Division problem

Hello. I'm working on a problem where I ask a user for input on 3 test scores in the format "score/max" and then I am to find the average. I am running into trouble with the code though. I attempted t...
Eric7Giants Homework 1 1,690 Nov-16-2019, 04:47 AM
    Thread: input string split
Post: RE: input string split

I am using version 2.7 As you asked that, I looked to see that split() isn't needed in python 2.7. However, when I worked on this some more, if I input 12 and print (x_input[1]) just the 2 prints. Ho...
Eric7Giants General Coding Help 3 2,998 Nov-13-2019, 06:43 PM
    Thread: input string split
Post: input string split

Hello. Self-teaching and new to Python. I am trying to code a program where I ask a user for 2 points and attempt to calculate the distance. I keep running into errors when I try to take the inputted ...
Eric7Giants General Coding Help 3 2,998 Nov-13-2019, 06:12 PM

User Panel Messages

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