Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Hot mess with functions, lists, and while loop
Post: RE: Hot mess with functions, lists, and while loop

jefsummers and perfringo: Thank you both for helping me understand the problem better and for the time it must have taken to come up with your comments. I agree that the list of integers was not mea...
johneven Homework 7 4,795 Jul-15-2019, 09:47 PM
    Thread: Hot mess with functions, lists, and while loop
Post: RE: Hot mess with functions, lists, and while loop

Larz60- Thanks for this other way of solving the problem, but I have to solve it in the way that the homework problem asks. (see top of first post) metulburr- Thanks for your point by point answers.
johneven Homework 7 4,795 Jul-15-2019, 12:16 AM
    Thread: Hot mess with functions, lists, and while loop
Post: Hot mess with functions, lists, and while loop

The problem seems like it should be rather easy, but I'm all over the map in trying to solve it. Here it is: Write a function, sublist, that takes in a list of numbers as the parameter. In the funct...
johneven Homework 7 4,795 Jul-14-2019, 10:05 PM
    Thread: Calling a function from another function
Post: Calling a function from another function

Having trouble with this one. The problem reads below: You will need to write two functions for this problem. The first function, "divide" that takes in any number and returns that same number divide...
johneven Homework 2 2,909 Jul-09-2019, 12:26 AM
    Thread: finding p's in words of a multi-line text file
Post: RE: finding p's in words of a multi-line text file

Still need help with this one. My second attempt, trying to take Ichabod's advice. But I think I may have screwed up the code even more. In particular, I need help iteration over lines and then iterat...
johneven Homework 5 4,427 Jun-23-2019, 06:57 PM
    Thread: finding p's in words of a multi-line text file
Post: finding p's in words of a multi-line text file

Here's the assignment given: Using the file school_prompt.txt, if the character ‘p’ is in a word, then add the word to a list called p_words. (I will post text file at bottom of this post.) Here's m...
johneven Homework 5 4,427 Jun-21-2019, 02:14 AM
    Thread: for loops and if
Post: RE: for loops and if

An answer to problem: scores = "67 80 90 78 93 20 79 89 96 97 92 88 79 68 58 90 98 100 79 74 83 88 80 86 85 70 90 100" scoressplit = scores.split() #print(scoressplit) accum = 0 for sc in scoressplit...
johneven Homework 5 5,518 May-06-2019, 09:01 PM
    Thread: Nested formatting?
Post: Nested formatting?

Sorry for another thread, but this is my favorite place to get help. The problem is below. Provided is a list of data about a store’s inventory where each item in the list represents the name of an i...
johneven Homework 1 3,040 May-06-2019, 10:29 AM
    Thread: for loops and if
Post: for loops and if

I feel like my code is correct, but keep getting wrong output for this homework question. The problem is: Below are a set of scores that students have received in the past semester. Write code to det...
johneven Homework 5 5,518 May-06-2019, 04:47 AM
    Thread: Filter out all words that begin with P, B, or T.
Post: Filter out all words that begin with P, B, or T.

Need help with the following: Filter out all words that begin with P, B, or T. colors = ["Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet", "Purple", "Pink", "Brown", "Teal", "Turquois"...
johneven Homework 3 2,769 May-05-2019, 09:53 PM
    Thread: Use range to add char. to empty string
Post: Use range to add char. to empty string

This seems simple enough, but I can't seem to get my head around it. The problem: Create an empty string and assign it to the variable lett. Then using range, write code such that when your code is r...
johneven Homework 5 13,936 Apr-15-2019, 09:15 AM
    Thread: Find 'greater than' items in list
Post: Find 'greater than' items in list

rainfall_mi is a string that contains the average number of inches of rainfall in Michigan for every month (in inches) with every month separated by a comma. Write code to compute the number of months...
johneven Homework 2 4,499 Apr-05-2019, 04:39 AM
    Thread: Nested if stmts in for loop
Post: Nested if stmts in for loop

I'm completely flummoxed by this one. Homework question follows: Create an empty list called resps. Using the list percent_rain, for each percent, if it is above 90, add the string ‘Bring an umbrella...
johneven Homework 2 5,918 Mar-22-2019, 10:01 PM
    Thread: counting chars in string w/o len
Post: counting chars in string w/o len

Here's my homework assignment: Write code to count the number of characters in original_str using for loop as a counter and assign the answer to a variable num_chars. Do NOT use the len function to s...
johneven Homework 2 4,152 Mar-20-2019, 06:23 PM
    Thread: turtle polygon as specified by user input
Post: RE: turtle polygon as specified by user input

thanks ichabod801, it did the trick
johneven Homework 7 10,833 Mar-02-2019, 10:11 PM
    Thread: turtle polygon as specified by user input
Post: RE: turtle polygon as specified by user input

No error messages!
johneven Homework 7 10,833 Mar-01-2019, 12:30 AM
    Thread: turtle polygon as specified by user input
Post: RE: turtle polygon as specified by user input

Thanks for the tip. Reading the error and a little trial and error and I was able to get turtle to draw polygon. I'm still having trouble with color and fillcolor of polygon. Any suggestions? import t...
johneven Homework 7 10,833 Feb-28-2019, 07:52 PM
    Thread: turtle polygon as specified by user input
Post: turtle polygon as specified by user input

The following is an exercise question from tutorial course and my code. Write a program that asks the user for the number of sides, the length of the side, the color, and the fill color of a regular ...
johneven Homework 7 10,833 Feb-28-2019, 08:43 AM
    Thread: Newbie to CS and Python, 2 questions
Post: RE: Newbie to CS and Python, 2 questions

Hi J.Crater, I've been perusing my notes throughout the day and found solutions to my above problems. Thanks for your offer of help. I may well need it another day. Best, John
johneven Homework 2 2,249 Feb-01-2019, 03:00 AM
    Thread: Newbie to CS and Python, 2 questions
Post: Newbie to CS and Python, 2 questions

Hello, I'm a newbie to CS and Python (i.e., 2 weeks)and have been doing fairly well so far, but I've been having trouble with the following questions. They seem easy enough, but I'm stuck and can't f...
johneven Homework 2 2,249 Jan-31-2019, 07:16 AM

User Panel Messages

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