Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

The syntax error is unexpected indent and invalid syntax please help me it is in Python 3

+3 votes
asked Dec 21, 2022 by Rex (360 points)
This is the code

Noun = "Tree"
  Any made up Holiday = "Tree Fest"
  Verb = "Shade"
  Random Number = "5"
  Adjective = "Carving"
  Any creature of choice = "Gagachomp"
  Verb eating = "Dine"
  noun = "Baby"
  a known or unknown piece of furniture = "Palazzo Chair"
  A made up tree = "Victory" A known or unknown piece of furniture = "Shelf"
print ("1", Noun, "Upon a year"
       up holiday,." Tree - Fest is a holiday where trees give their 3 ", Verb, " to people in exchange for water and sunlight, while not being cut down for another day.When 4 ", Random Number, " boys show up in the forest, they start making a tree house by cutting down another tree.The boys made the tree house by 5 ", adjective, " out the tree into a small cottage like shape.While the boys were making the treehouse, they encountered a 6 ", Garachomp, " an 11 - foot - tall baby garachomp which was hurdling towards them with its 7 eyes, 4 legs but walks like a human and 12 arms.The boys were in shock but knew what to
       do
       because at this time of year close to Tree - Fest Garachomps love to come out of their hiding spots and try to 7 ", Verb - eating on us humans,." The boys trap the garachomp and take it back to its home,
       after defeating a garachomp they started harvesting leaves and grass to make a 8 ",
       a known or unknown piece of furniture, " for the tree house.After making the palazzo chair for the tree house they made a 9 ", a known or unknown piece of furniture " after gathering the materials.Life was fine and simple after the boys made their tree house, and for the boys tomorrow is Tree - Fest the boys cut a few branches and trimmed their favorite tree that they were growing it was called a 10 ", A made up tree, " Tree and they lived happily ever 11 ", noun, ")

Also it won't allow me to debug the program.

1 Answer

0 votes
answered Dec 21, 2022 by WhatDoWeDoNow (390 points)
Everything after Noun is indented, and it should be, variable names can't have spaces, the print at the end is quite honestly, atrocious, and you didn't add either multi-line strings, or a long single line. The fixed code is:

Noun = "Tree"

MadeUpHoliday = "Tree Fest"

Verb = "Shade"

Number = "5"

Adjective = "Carving" # caring?

Creature = "Gagachomp"

VerbEating = "Dining"

noun = "Baby"

furniture = "Palazzo Chair"

tree = "Victory"

other_furniture = "Shelf"

print(f"1 {Noun} upon a year, {MadeUpHoliday}. TreeFest is a holiday where trees give their 3 {Verb} to people in exchange for water and sunlight, while not being cut down for another day. When 4 {Number} boys show up in the forest, they start making a tree house by cutting down another tree. The boys made their tree house by 5 {Adjective} out the tree into a small cottage-like shape. While the boys were making the tree house, they encountered a 6 {Creature}, an 11-foot tall baby Garachomp which was hurdling towards them with its 7 eyes, 4 legs, but walks like a human and 12 arms. The boys were in shock but knew what to do because at this time of year, close to TreeFest, Garachomps love to come out of their hiding spots and try to 7 {VerbEating} on us humans. The boy's trapped the Garachomp and took it back to it's home. After defeating a Garachomp, they started harvesting leaves and grass to make a 8 {furniture} for the tree house. After making the palazzo chair for the tree house, they made a 9 {other_furniture} after gathering the materials. Life was fine and simple after the boys made their tree house, and for the boys, tomorrow is TreeFest, so the boys cut a few branches and trimmed their favorite tree that they were growing. It was called a 10 {tree} Tree, and they lived happily ever 11 {noun}.")
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...