Python Forum
Newb question about %02d %04d
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newb question about %02d %04d
#30
Well I got a couple of more questions for you guys.

1. Does the code below seem convoluted to yall? Particularly the part where they had me do str(row_count). What is the purpose of that? If you were making a spreadsheet, why wouldn't you just set the number of rows to be 1,000? They lose me on some of this stuff.

2. My next question is in regards to commas. Its little things like this that hang me up. How do you know when you can use a comma, and when you can't? Again if you look below, you can see the use of commas. But I've tried to use them in some situations, and things just didn't work out. This sounds like a dumb question to me but: Wouldn't python just disregard the commas if you couldn't use them? Can someone go into when you can use commas, and when you can't?

# Define create_spreadsheet():
def create_spreadsheet(title, row_count = 1000):
  print("Creating a spreadsheet called " + title + " with " + str(row_count) + " rows")

# Call create_spreadsheet() below with the required arguments:
create_spreadsheet("Downloads")
create_spreadsheet(title = "Applications", row_count = 10)
Reply


Messages In This Thread
Newb question about %02d %04d - by bennylava - Oct-16-2018, 03:39 AM
RE: Newb question about %02d %04d - by buran - Oct-16-2018, 06:06 AM
RE: Newb question about %02d %04d - by bennylava - Nov-06-2018, 03:46 PM
RE: Newb question about %02d %04d - by nilamo - Nov-06-2018, 03:59 PM
RE: Newb question about %02d %04d - by bennylava - Dec-11-2018, 11:01 AM
RE: Newb question about %02d %04d - by buran - Dec-11-2018, 11:14 AM
RE: Newb question about %02d %04d - by bennylava - Dec-11-2018, 12:30 PM
RE: Newb question about %02d %04d - by buran - Dec-11-2018, 01:03 PM
RE: Newb question about %02d %04d - by Gribouillis - Dec-11-2018, 01:41 PM
RE: Newb question about %02d %04d - by bennylava - Dec-15-2018, 03:25 PM
RE: Newb question about %02d %04d - by ichabod801 - Dec-15-2018, 03:45 PM
RE: Newb question about %02d %04d - by Gribouillis - Dec-15-2018, 03:47 PM
RE: Newb question about %02d %04d - by bennylava - Dec-27-2018, 07:29 PM
RE: Newb question about %02d %04d - by nilamo - Dec-27-2018, 07:45 PM
RE: Newb question about %02d %04d - by snippsat - Dec-27-2018, 09:47 PM
RE: Newb question about %02d %04d - by bennylava - Dec-30-2018, 11:06 PM
RE: Newb question about %02d %04d - by Larz60+ - Dec-31-2018, 01:28 AM
RE: Newb question about %02d %04d - by bennylava - Jan-06-2019, 01:35 PM
RE: Newb question about %02d %04d - by nilamo - Jan-07-2019, 03:50 PM
RE: Newb question about %02d %04d - by buran - Jan-06-2019, 02:10 PM
RE: Newb question about %02d %04d - by Gribouillis - Jan-06-2019, 02:14 PM
RE: Newb question about %02d %04d - by snippsat - Jan-06-2019, 02:53 PM
RE: Newb question about %02d %04d - by Gribouillis - Jan-06-2019, 02:55 PM
RE: Newb question about %02d %04d - by bennylava - Feb-12-2019, 07:26 AM
RE: Newb question about %02d %04d - by buran - Feb-12-2019, 07:53 AM
RE: Newb question about %02d %04d - by bennylava - Feb-12-2019, 11:29 AM
RE: Newb question about %02d %04d - by nilamo - Feb-12-2019, 05:00 PM
RE: Newb question about %02d %04d - by bennylava - Feb-14-2019, 05:58 AM
RE: Newb question about %02d %04d - by nilamo - Feb-14-2019, 07:14 PM
RE: Newb question about %02d %04d - by bennylava - Mar-05-2019, 09:44 PM
RE: Newb question about %02d %04d - by snippsat - Mar-05-2019, 11:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python newb need help Fictile 1 211 Apr-02-2024, 03:28 AM
Last Post: buran
  NameError issue with daughter's newb code MrGonk 2 1,451 Sep-16-2021, 01:29 PM
Last Post: BashBedlam
  Simple newb string question Involute 2 2,212 Sep-08-2019, 12:50 AM
Last Post: Involute
  please help this newb install pygame iofhua 7 5,939 May-15-2019, 01:09 PM
Last Post: buran
  Newb question: Debugging + Linting Python in Visual Studio Code Drone4four 1 2,427 Apr-15-2019, 06:19 AM
Last Post: perfringo
  Pthyon 3 question (newb) bennylava 11 5,861 Feb-28-2019, 06:04 PM
Last Post: buran
  newb selfie PatM 5 3,611 Feb-19-2019, 12:20 AM
Last Post: snippsat
  Complete NEWB and openpyxl project Netopia 44 17,310 Jan-18-2019, 08:15 PM
Last Post: Netopia
  Newb Question - Threading in Crons vvarrior 2 2,777 Jul-20-2018, 08:12 PM
Last Post: vvarrior
  Matt's newb question 1 MattSS102 1 2,703 Aug-28-2017, 03:27 AM
Last Post: BerlingSwe

Forum Jump:

User Panel Messages

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