I need help for my online course homework

I need help for my online course homework
0

#1

Hello, I am an absolute beginner that just started, and i need help with online course homework.

Instruction

Using Pseudocode:
Pseudocode with Input and Output
The goal is to write a program that asks the user to answer a joke and then print the response to the screen.
The pseudocode for this program could look like: Input: Ask the user what computers like to eat. Output: Display two messages. One will state the user’s guess. The other will share the correct answer.

My code:

#Pseudocode Sample

def main():
    answer = input("What part of a computer does a spider use?")
	print("Your guess was" + answer + ".")
	print("The correct answer was webcam."

main()

Output

ParseError: bad input on line 8


#2

Pseudocode should not be real, syntactically correct code. It is an outline of the logic that you need in order to solve the problem.


#3

I know, but I don’t understand how I got my output: ParseError: bad input on line 8.


#4

4 things:

  1. You are using Python3 syntax, but may be running in a Python 2.7 environment
  2. You are missing a )
  3. You are using weird quotation marks that are not the actual characters that Python understands (I’m guessing that you’re on an Apple device and have “smart punctuation” enabled).
  4. Your code may not be properly indented.

#5

Ok, I understand,thank you for the feedback!


#6

In that kind situation you just can’t stand doing it. I mean, homework could be nasty and you just can’t stand doing it. Stick to the https://homework-lab.com/examples/ and you will be good.