5 Replies - 475 Views - Last Post: 17 January 2019 - 01:48 PM Rate Topic: -----

#1 warrenb17   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 41
  • Joined: 10-July 17

looping to get a to z

Posted 17 January 2019 - 01:35 PM

hi guys have to code this question

Write a Python program that will output the lowercase letters of the alphabet in one line with a space between them.

for i in range (unicode,unicode):
    print(i)


is throwing me errors, whats the easiest to loop out a to z?
thanks
Is This A Good Question/Topic? 0
  • +

Replies To: looping to get a to z

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14844
  • View blog
  • Posts: 59,240
  • Joined: 12-June 08

Re: looping to get a to z

Posted 17 January 2019 - 01:39 PM

This isn't really a 'discussion', but help. Moving to the general help section.

Quote

is throwing me errors,

Copy/paste your errors here.
Was This Post Helpful? 0
  • +
  • -

#3 warrenb17   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 41
  • Joined: 10-July 17

Re: looping to get a to z

Posted 17 January 2019 - 01:43 PM

sorry mod my mistake

i think this is on the right track
my table though doesnt seem correct

for i in range (127,223):
    print (chr(i))

Was This Post Helpful? 0
  • +
  • -

#4 DK3250   User is online

  • Pythonian
  • member icon

Reputation: 507
  • View blog
  • Posts: 1,596
  • Joined: 27-December 13

Re: looping to get a to z

Posted 17 January 2019 - 01:45 PM

ASCII of 'a' is 97
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14844
  • View blog
  • Posts: 59,240
  • Joined: 12-June 08

Re: looping to get a to z

Posted 17 January 2019 - 01:46 PM

Ye ol' ascii table.
http://www.asciitable.com/
Was This Post Helpful? 0
  • +
  • -

#6 warrenb17   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 41
  • Joined: 10-July 17

Re: looping to get a to z

Posted 17 January 2019 - 01:48 PM

was asci not unicode codes i was looking for
range 97 to 123
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1