Jul-20-2023, 09:18 AM
On the use of elif, the code is not responding to print
here is the code from Spyder (Python 3.11) IDE:
Python 3.11.3 | packaged by Anaconda, Inc. | (main, Apr 19 2023, 23:46:34) [MSC v.1916 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 8.12.0 -- An enhanced Interactive Python.
runfile('C:/Users/hp/Spyder/What is my Grade.py', wdir='C:/Users/hp/Spyder')
Enter the Grade: 90
You Got an BA! Congrats!
This version of python seems to be incorrectly compiled
(internal generated filenames are not absolute).
This may make the debugger miss breakpoints.
Related bug: http://bugs.python.org/issue1666807
runfile('C:/Users/hp/Spyder/What is my Grade.py', wdir='C:/Users/hp/Spyder')
Enter the Grade: 85
runfile('C:/Users/hp/Spyder/What is my Grade.py', wdir='C:/Users/hp/Spyder')
Enter the Grade: 80
runcell(0, 'C:/Users/hp/Spyder/What is my Grade.py')
Enter the Grade: 75
is it because of this comment on the console? How can this be corrected?
**This version of python seems to be incorrectly compiled
(internal generated filenames are not absolute).
This may make the debugger miss breakpoints.
Related bug: http://bugs.python.org/issue1666807
EddieG
here is the code from Spyder (Python 3.11) IDE:
# -*- coding: utf-8 -*- """ Created on Thu Jul 20 16:39:11 2023 @author: hp """ grade = int(input("Enter the Grade: ") ) if grade>90: print("You Got an AA! Congrats!") elif grade>85 : print("You Got an BA! Congrats!") elif grade>80 : print("You Got an BB! Congrats!") elif grade>75 : print("You Got an CB! Congrats!")0n the console response, It print the conditions IF, but not on the condition elif.
Python 3.11.3 | packaged by Anaconda, Inc. | (main, Apr 19 2023, 23:46:34) [MSC v.1916 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 8.12.0 -- An enhanced Interactive Python.
runfile('C:/Users/hp/Spyder/What is my Grade.py', wdir='C:/Users/hp/Spyder')
Enter the Grade: 90
You Got an BA! Congrats!
This version of python seems to be incorrectly compiled
(internal generated filenames are not absolute).
This may make the debugger miss breakpoints.
Related bug: http://bugs.python.org/issue1666807
runfile('C:/Users/hp/Spyder/What is my Grade.py', wdir='C:/Users/hp/Spyder')
Enter the Grade: 85
runfile('C:/Users/hp/Spyder/What is my Grade.py', wdir='C:/Users/hp/Spyder')
Enter the Grade: 80
runcell(0, 'C:/Users/hp/Spyder/What is my Grade.py')
Enter the Grade: 75
is it because of this comment on the console? How can this be corrected?
**This version of python seems to be incorrectly compiled
(internal generated filenames are not absolute).
This may make the debugger miss breakpoints.
Related bug: http://bugs.python.org/issue1666807
EddieG