+ 2

(SOLVED)Why does it say 14

I imported random into this code, and sometimes it outputs the number 14 when I run it. I put it so that when it equals 14 to equal a variable. But why doesn't it work sometimes? https://code.sololearn.com/ccxhE00Ni4TP/#py

15th May 2020, 7:05 PM
GermoOKD
GermoOKD - avatar
10 ответов
+ 2
Abhay The input that was wrong was one of the random outputs you get when you submit Become Friends Become friends friends Friends become friends I made it so that there would be a 3/5 chance of winning the game with that part of the story, or doing a harder part of the story I realized that I had put == instead of =. Thanks for your guyses help as for the all the if statements, its because I add stuff to the game a lot and there are a lot of paths that you can take. I am messy.
15th May 2020, 7:52 PM
GermoOKD
GermoOKD - avatar
+ 1
Very very very dificult code, unreadable many ifs, may be you forgot somewhere else. Or something else
15th May 2020, 7:30 PM
george
george - avatar
+ 1
oof sorry I accidentally put if y == 14: y == q thanks for the help!
15th May 2020, 7:40 PM
GermoOKD
GermoOKD - avatar
+ 1
You can remove just 10 000 if, just after input make the str lower and you it, or if you want very beatiful writing you can make lower and the capitalize it. And in this case if you enter dog,Dog,dOg,DOG,doG you need just check on Dog
15th May 2020, 7:58 PM
george
george - avatar
0
How does this works?I inputted Dog and I dunno what to do further
15th May 2020, 7:14 PM
Abhay
Abhay - avatar
0
You input the answer to the question Ex. fight Don't keep your other commands.
15th May 2020, 7:18 PM
GermoOKD
GermoOKD - avatar
0
Your code is really hard to read tho,i entered become friends 3 times and the program ended so I really cudn't figure out what is happening ,thankfully you solved it on your own :-)
15th May 2020, 7:55 PM
Abhay
Abhay - avatar
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 yup the code is messy if you read it yourself ,maybe you have a lot of time to solve others problem ,but I can't just stress myself wondering what's happening
15th May 2020, 8:46 PM
Abhay
Abhay - avatar