Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Having trouble trying to run program. I'm getting an syntax error on the first else statement even though I have it indented correctly ScottJr.UnitB.py-D:/Python/ScottJr.UnitB.py (3.7.0)

Having trouble trying to run program. I'm getting an syntax error on the first "else" statement even though I have it indented correctly

image text in transcribed

ScottJr.UnitB.py-D:/Python/ScottJr.UnitB.py (3.7.0) File Edit Format Run Options Window Help #Declare a variable and initialize it numcode num = weight num = MOONFACTOR-0.166 num moonWeight print ("1 English or 2 Espanol >>") - code input ("Enter code for instructions") displayInstructions (code) weight input ("Enter weight for moon") moonWeight = weight * MOONFACTOR If code == 1: - print ("Your weight on the moon would be ", moonweight) print ("Su peso en la luna seria ", moonWeight) print ("Stop") displayInstructions (num langCode) str .ENGLISH_PROMPT str. SPANISH-PROMPT = "Por favor entre en su peso en libras >> " if langCode = 1: - "Please enter your weight in pounds > print ("ENGLISH PROMPT") print ("SPANISH-PROMPT") print ("Stop") else elif

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

Students also viewed these Databases questions