-4

Where I am making mistake on these codes? It says I did not close the You haven't properly closed the string on line 206.

def deliveryaddress():
    userDisplayMenu()
    p_id = int(input("\nEnter delivery address : "))
    print("\nEnter delivery address")
    for d in mobile:
        if d["id"]== p_id:
            print("Delivery Address")
        print("***************************************************")
        print f'{d(name = input(d["Name: "])}\t{Housenumber = input("d[House Number: "])}\t{streetaddress = input("d[Street Address: "])}\t
{city = input([d"City: "])}\t{Postcode = input([d"Post Code: "])}\t{Country = input([d"Country: "])}'
  • please edit this with the full code. – Riceblades May 26 '22 at 16:37
  • 1
    @Riceblades this seems adequate and the full code is at least 206 lines! – ti7 May 26 '22 at 16:38
  • 2
    You are missing a `'` in the last line of your function - the python interpreter will literally point it out to you with a `^` – Mortz May 26 '22 at 16:40
  • 3
    `print f'` is a red flag... – Kelly Bundy May 26 '22 at 16:40
  • 1
    @ti7 I would say even more, since the OP wrote 3 lines in one – FLAK-ZOSO May 26 '22 at 16:40
  • 1
    In several instances you have `"d[` instead of `d["`. Also it seems a `'` is missing at the end. If you encounter something like this, just keep track of open delimiters (`" "`, `' '`, `[ ]`, `( )`, `{ }`) for example on a piece of paper, writing new open delimiters down while crossing out the previous one when encountering closing delimiters, and then you'll see when you encounter a closing delimiter for something that's not the last one not crossed out, or you have something still not crossed out when you reached the end, you found your issue. – CherryDT May 26 '22 at 16:40
  • 2
    You cannot break a string enclosed in `''` or `""` across lines. Use `\n` to represent a line break, or use triple-quotes (`''' '''` or `""" """`) to allow line breaks inside the string. – Karl Knechtel May 26 '22 at 16:42

0 Answers0