Python Forum
write a program which prints the day in english
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
write a program which prints the day in english
#7
import calendar
    
num = calendar.weekday(2021, 12, 7)
# Constants for weekdays
days = ('MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY')
print(days[num])
Reply


Messages In This Thread
RE: write a program which prints the day in english - by saidben7243 - Jul-24-2021, 08:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  zfill prints extra et the end of a var tester_V 4 935 Mar-24-2023, 06:59 PM
Last Post: tester_V
  (python) Can i get some help fixing a English to Morse translator? Pls AlexPython 7 1,659 Sep-12-2022, 02:55 AM
Last Post: AlexPython
  variable prints without being declared. ClockPillow 2 1,840 Jul-11-2021, 12:13 AM
Last Post: ClockPillow
  More non english characters johnboy1974 8 4,568 Apr-23-2021, 02:35 PM
Last Post: snippsat
  Output prints Account.id at the end? LastStopDEVS 5 2,861 Dec-19-2020, 05:59 AM
Last Post: buran
  I have an index error inline 76 but I write the program in a way that cant reach tha abbaszandi 2 2,100 Nov-13-2020, 07:43 AM
Last Post: buran
  Try/Exept prints only ones tester_V 11 3,964 Nov-03-2020, 02:38 AM
Last Post: tester_V
  loop only prints last character. mcmxl22 1 1,751 Feb-17-2020, 02:36 AM
Last Post: menator01
  How to write a script to execute a program need passing additional input? larkypython 2 2,598 Nov-23-2019, 04:38 AM
Last Post: larkypython
  English interpretation of the following file handing snippet mortch 5 3,227 May-30-2019, 08:10 AM
Last Post: mortch

Forum Jump:

User Panel Messages

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