0

my program d = ray print('ray' *3) I run the output then I get an error last line talks about name type not identified I need some help

31st Jul 2016, 12:57 AM
Raymond Obeng
Raymond Obeng - avatar
4 Antworten
+ 4
d = ray will print an error. ray is not defined, and it's not a string
31st Jul 2016, 6:35 AM
Chuma Umenze
+ 2
see..ray is a word ..which you're initialising to a variable(in your case 'd').for a non-numerical value,when you initialise it it must be inside a '' or "". thus. d='ray'.thus.it will print rayrayray,three times in a row. note-when you get a error last line is useful. in you case..'' or "" was the problem
31st Jul 2016, 12:29 PM
sushant
sushant - avatar
+ 2
u Miss's something ...... d='ray' print ('d'*3)
7th Aug 2016, 6:53 AM
vikrAm
vikrAm - avatar
+ 1
okay got it now
31st Jul 2016, 1:00 AM
Raymond Obeng
Raymond Obeng - avatar