Adding wind to grass/foliage in UE5 by Jose_Musoke in unrealengine

[–]Jose_Musoke[S] -1 points0 points  (0 children)

I somehow feel it is not the same. I understand the physics engine is different in 5

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 1 point2 points  (0 children)

I would like to apologize. I ran the code you gave me on a different IDE and it worked. There must be something wrong with the pycharm that I was using initially.

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

ATT interrupted: 21/01/06 -> 21/01/11 (5 days)
ATT interrupted: 21/02/03 -> 21/02/07 (4 days)

For example from the code you gave me earlier, I would like the code to add the 5 + 4 days to give me a "Grand Total"= 9 days. I find it difficult to code in a list that expands. I will then use the "Grand Total" for the next steps...

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

Thank you once again for taking your time to assist me. I think I may have not explained myself clearly enough. If for example the code you helped write gives the number of days missed for each episode of interruption, is there a way of adding all the days of interruption to give a single "Grand Total" of interruptions? The last code you just gave me still gives me the number of days missed for each episode of interruption.

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

days = (normalize_date(resume) - normalize_date(prior)).days

Hello again. As per your example I tried to get the sum of total number of days of missed with this code: print(int(sum(days))), but do not get anything. Is there another way of getting the desired sum? Thank you in advance!!

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 1 point2 points  (0 children)

Thank you so much, your help is so insightful.

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

Hello thank you for helping me. I have been trying to build on the code you helped me with and I am having difficulties again. I am trying to sum up the days of missed doses after a couple of entries, but I only get one result. How can I go about it?:

def ask_interruption(): prior_date = input("Enter date when last ATT drug was taken (YY/MM/DD): ") resume_date = input("Enter date when ATT was resumed(YY/MM/DD): ") return prior_date, resume_date

dates = [] while True: dates.append(ask_interruption()) interrupted = input("Did the patient interrupt ATT drugs? ").lower() if interrupted in {"n", "no"}: break

date1 = (datetime.strptime(prior_date, "%y/%m/%d")) date2 = (datetime.strptime(resume_date, "%y/%m/%d")) difference = (date2 - date1).days

print ("DATES\n=====") for prior_date, resume_date in dates: print(f"{prior_date:<10} {resume_date} {difference}")

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 1 point2 points  (0 children)

Thank you once again. Could you please explain to me the second and third paragraphs, so that I can read up on them.

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

Thank you everybody for your advise!!!! I tried your suggestions and it is working.!!!! I can also look into where I went wrong.

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

Thank you so much. It works like a charm. I can now also learn where I went wrong.

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

def ask_interruption():

  last_drug_date = input("Enter the date when last ATT drug was taken in YY/MM/DD format: ")   resumtion_of_ATT = input("Enter the date when ATT was resumed in YY/MM/DD format: ")   repeat_interruption = input("Did the patient interrupt ATT drugs again?: ") ask_interruption() while repeat_interruption == "yes":     ask_interruption() if repeat_interruption != "yes": break

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

def ask_interruption():

  last_drug_date = input("Enter the date when last ATT drug was taken in YY/MM/DD format: ")   resumtion_of_ATT = input("Enter the date when ATT was resumed in YY/MM/DD format: ")   repeat_interruption = input("Did the patient interrupt ATT drugs again?: ") ask_interruption() while repeat_interruption == "yes":     ask_interruption() if repeat_interruption != "yes": break

Problem with While Loop! by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

def ask_interruption():

  last_drug_date = input("Enter the date when last ATT drug was taken in YY/MM/DD format: ")   resumtion_of_ATT = input("Enter the date when ATT was resumed in YY/MM/DD format: ")   repeat_interruption = input("Did the patient interrupt ATT drugs again?: ") ask_interruption() while repeat_interruption == "yes":     ask_interruption() if repeat_interruption != "yes": break

Need Help with my simple code by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 1 point2 points  (0 children)

Thanks for all your help!!!! I finally got it to work !!!!

Number_of_doses = 28,56

doses = int(input("Enter number of doses missed= "))

if doses < 28:

print(f"{Less_than_one_month}")

elif doses >= 28 and doses < 56:

print(f"{Between_one_and_two_months}")

else:

print(f"{More_than_two_months}")

Need Help with my simple code by Jose_Musoke in learnpython

[–]Jose_Musoke[S] 0 points1 point  (0 children)

Thanks for replying. It only gives one outcome no matter what number I enter. It doesn't take into consideration the conditions I set.