0
Complete the program to output "accepted" if the card is Visa or Amex. Don't output anything otherwise.
"accepted" if type = Visa or Amex ( Test case that's wrong Mastercard should output nothing
9 odpowiedzi
+ 2
Even if type=='Amex' is False, 'Visa' will always be True
What you wanted to do is
if type == 'Amex' or type == 'Visa'
Or better
if type in ['Amex', 'Visa']
+ 3
Amr Monsef
Condition is little wrong. There should be
if type == 'Amex' or type == 'Visa':
+ 2
Amr Monsef
Show your code?
We have to print accepted in case of only Visa or Amex otherwise don't print anything.
+ 2
Jay Matthews
Lol sir there is unknown person who disliked our answer unnecessary even we are right. Can you please check and warn.
+ 1
Amr Monsef
This is just a simple comparison.
Test cases are not wrong.
You didn't understand this line so you think test cases are wrong.
"Complete the program to output "accepted" if the card is Visa or Amex.
Don't output anything otherwise."
Read last statement again "Don't output anything otherwise".
0
it's a task that i can't answer
0
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ test case that I GOT WRONG bro I don't know how to solve this and i need help, didn't say the app is wrong lol
0
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟
type = input ()
if type == 'Amex' or 'Visa' :
print ('accepted')
that's all i got here .. but the case im missing is when the input is anything else for instance "Mastercard" it still gets "accepted"
0
thanks Angelo