Python Forum
write new function or change the old one to work "smartter?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
write new function or change the old one to work "smartter?
#4
Hello,

I wouldn't say they do 95% the same job. If I've understood correctly, the first function is for manual entry so if you're looking to keep manual entry as an option (Opposed to entry via Excel) then you'll need a second function to do the importing from the excel spreadsheet.

Cheers,
Jamie
while dad_has_cigs == True:
    happiness = True
    if dad_has_cigs == False:
    print("Dad come home!")
    happiness = not happiness
    break
Reply


Messages In This Thread
RE: write new function or change the old one to work "smartter? - by jamesaarr - Aug-09-2021, 10:36 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What does .flush do? How can I change this to write to the file? Pedroski55 3 299 Apr-22-2024, 01:15 PM
Last Post: snippsat
  print doesnt work in a function ony 2 348 Mar-11-2024, 12:42 PM
Last Post: Pedroski55
  Better way to write this function SephMon 1 846 Feb-08-2023, 10:05 PM
Last Post: Gribouillis
  I dont know why my function won't work? MehHz2526 3 1,243 Nov-28-2022, 09:32 PM
Last Post: deanhystad
  time function does not work tester_V 4 3,115 Oct-17-2021, 05:48 PM
Last Post: tester_V
  UART Serial Read & Write to MP3 Player Doesn't Work bill_z 15 5,938 Jul-17-2021, 04:19 PM
Last Post: bill_z
  string function doesn't work in script ClockPillow 3 2,455 Jul-13-2021, 02:47 PM
Last Post: deanhystad
  How can I write a function with three parameters? MehmetAliKarabulut 1 2,452 Mar-04-2021, 10:47 PM
Last Post: Larz60+
  Why does unpickling only work ouside of a function? pjfarley3 5 3,493 Dec-24-2020, 08:31 AM
Last Post: pjfarley3
  How to write a code with İF function? Aycaaxx 1 1,873 Nov-03-2020, 05:46 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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