def defineType(riskCode):
if riskCode == 1:
riskType = High
else:
if riskCode == 2:
riskType = Moderate
else:
if riskCode == 3:
riskType = Low
else:
if RiskCode == 4:
riskType = No
This is part of a program I'm working on for a class...
# Global Variables
custName = input('Please enter your name: ')
custAge = int(input('Please enter your age: '))
custViolation = int(input('Please enter the number of violations: '))
riskCode = 0
estimatePrice = 0
riskType = none
These are my global variable...
Traceback (most recent call last):
File "C:\Users\Alli\Downloads\HwyRobbery.py", line 13, in <module>
riskType = none
NameError: name 'none' is not defined
This is the error that I keep getting with different variations depending on what changes I make to try to solve the problem
Any help would be greatly appreciated!!!
Thanks! Alli
It's None not none. Python is case sensitive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With