Question: The language is python. I'm trying to find the error in there. Fix this program. This program has two syntax errors, one runtime error and

 The language is python. I'm trying to find the error inthere. Fix this program. This program has two syntax errors, one runtime

The language is python. I'm trying to find the error in there.

Fix this program. This program has two syntax errors, one runtime error and one logical error. # INPUT fltGradel = float (input ("What is your first grade? => ")) fltGrade2 = float (input ("What is your second grade? => ")) ftiGrade 3 = float(input ("What is your third grade? => ") intNumcis = 3 ## Number of classes fltAveGrd = 0.0 ## Average Grade # PROCESSING fltAveGrd = fltGradel + fltGrade2 + fltGrade3/intNumCls # OUTPUT print ("The Average Grade is", fltAveGrd Fix this program and text with the following output What is your first grade? => 80 What is your second grade? => 90 What is your third grade? => 60 The Average Grade is 76.66666666666667 What's in a name? The following script takes my name and tells me the ASCII, Hexadecimal and binary values of it. (Note the continuation character. This lets me break up a line of code to multiple lines) strMyNameASCII = str (ord("G")) + " " + str (ord("R")) +""+! str (ord ("A")) + " " + str (ord ("N")) + " " + str (ord ("I")) strMyNameinBin = bin (ord("G")) + + bin (ord ("R")) + " " + bin (ord ("A")) + " + bin (ord ("N")) + bin (ord ("T")) TI TI TI strMyNameinHex = hex (ord ("G")) + " hex (ord ("A")) + hex (ord ("T")) + hex (ord ("R")) + " + hex (ord ("N")) + TI print ("My name (Grant) in ASCII is ", strMyNameASCII) print ("My name (Grant) in hexidecimal is ", strMyNameinHex) print ("My name (Grant) in binary is ", strMyNameinBin) Note: this is NO WHERE NEAR the coolest way to do this. We will improve on this later. Alter the script so that you are using YOUR first name (or nickname). Then, when you are finished your run, in the interpreter, get Python to tell you - the value of each variable the type of each variable the id of each variable in decimal in hex the size of each variable. Use the dialogue below for inspiration. (Note the import of sys!!) OLE Shell 391 File Edit Shell Debug Options Window Help Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) (MSC v.1927 64 bit (AM D64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. RESTART: C:/Users/gijrs/OneDrive/Desktop/FOP/Chapter 04/VarDemo.py My name (Grant) in ASCII is 71 82 65 78 84 My name (Grant) in hexidecimal is Ox47 Ox52 Ox41 Ox 4e Ox54 My name (Grant) in binary is Ob1000111 Ob1010010 Ob1000001 Ob1001110 Ob1010100 >>> import sys >>> print (strMyNameASCII, type (strMyNameASCII), id (strMyNameASCII), \ hex(id (strMyNameASCII)), sys.getsizeof(strMyNameASCII)) 71 82 65 78 84 2433275403952 Ox2368a841ebo 63 >>> print (strMyNameinbin, type (strMyNameinBin), id (strMyNameinBin), I hex(id (strMyNameinBin)), sys.getsizeof(strMyNameinBin)) Ob1000111 Ob1010010 Ob1000001 Ob1001110 Ob1010100 2433275656432 0x 2368a87f8f0 98 >>> print (strMyNameinHex, type (strMyNameinHex), id (strMyNameinHex), \ hex(id(strMyNameinHex)),sys.getsizeof(strMyNameinHex)) Ox47 Ox52 Ox41 0x4e Ox54 2433315500400 Ox2368ce7f170 73

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!