Python Forum
Newbie to CS and Python, 2 questions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie to CS and Python, 2 questions
#1
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 figure it out.

Question #1
Create a list from 0 through 40 and assign that list to the variable numbers1. Then, accumulate the total of the list’s number values and assign that sum to the variable sum1.

Question #2
Count the number of characters in string1. Try not to use (len). Instead, use a Python function. Then save the number in variable numbers1.
  • 1 string1 = "I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living."

These are similar to practice questions in a Coursera course.

Thank you in advance for your help. Answers for these would be great so I can see and learn how to tackle such code.
Reply
#2
Hello, we are happy to help, but will not write code for you.
Show your attempt at solving the tasks (in Python code tags) and we will point out what the problems are and guide you to solving the problems.
Reply
#3
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  newbie questions about objects properties... slowbullet 2 2,625 Aug-12-2018, 01:12 PM
Last Post: Gribouillis
  Questions about the GET and POST submission form Functions in Python for a Trivia Gam martin28 8 3,982 Aug-05-2018, 09:47 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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