Python Forum
Read from a file, get user input in a while loop
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read from a file, get user input in a while loop
#8
(Nov-04-2018, 02:14 PM)lynden Wrote: Thank you, but it is coming up with a syntax error on line 19 (the bracket) and I've tried to make it better but it keeps coming up as wrong.
Sorry, my mistake - there is missing closing parenthesis on line 18
answer = input("Guess the song!\n{}\n>> ".format(song[0]))
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Read from a file, get user input in a while loop - by buran - Nov-04-2018, 04:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Connecting to Remote Server to read contents of a file ChaitanyaSharma 1 500 May-03-2024, 07:23 AM
Last Post: Pedroski55
  Help with to check an Input list data with a data read from an external source sacharyya 3 678 Mar-09-2024, 12:33 PM
Last Post: Pedroski55
  Recommended way to read/create PDF file? Winfried 3 3,160 Nov-26-2023, 07:51 AM
Last Post: Pedroski55
  python Read each xlsx file and write it into csv with pipe delimiter mg24 4 1,912 Nov-09-2023, 10:56 AM
Last Post: mg24
  WHILE LOOP NOT RETURNING USER INPUT AFTER ZerroDivisionError! HELP! ayodele_martins1 7 1,355 Oct-01-2023, 07:36 PM
Last Post: ayodele_martins1
  read file txt on my pc to telegram bot api Tupa 0 1,317 Jul-06-2023, 01:52 AM
Last Post: Tupa
  parse/read from file seperated by dots giovanne 5 1,319 Jun-26-2023, 12:26 PM
Last Post: DeaD_EyE
  Formatting a date time string read from a csv file DosAtPython 5 1,724 Jun-19-2023, 02:12 PM
Last Post: DosAtPython
  How do I read and write a binary file in Python? blackears 6 8,603 Jun-06-2023, 06:37 PM
Last Post: rajeshgk
  restrict user input to numerical values MCL169 2 1,091 Apr-08-2023, 05:40 PM
Last Post: MCL169

Forum Jump:

User Panel Messages

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