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


Messages In This Thread
Newbie to CS and Python, 2 questions - by johneven - Jan-31-2019, 07:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  newbie questions about objects properties... slowbullet 2 2,792 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 4,179 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