- 1

I was able to get the Amex and Visa but the problem is with the mastercard

Task Complete the program to output "accepted" if the card is Visa or Amex. Don't output anything otherwise. Sample Input Amex Sample Output accepted

6th Nov 2022, 1:10 AM
ARBEIT MANN
ARBEIT MANN - avatar
13 Respuestas
+ 2
Read the task description carefully: The output is "Wrong number", not "Wrong Number"
6th Nov 2022, 10:13 AM
Lisa
Lisa - avatar
0
SINKREAN VAEGAN GATES KLINßMANN Include in the question description a link to your code in Code Playground and an explanation of your difficulties. E ~ J Your code has two errors. Did it work in Code Playground?
6th Nov 2022, 5:22 AM
Emerson Prado
Emerson Prado - avatar
0
Okh
6th Nov 2022, 6:14 AM
ARBEIT MANN
ARBEIT MANN - avatar
0
But I still need your help
6th Nov 2022, 6:14 AM
ARBEIT MANN
ARBEIT MANN - avatar
0
Its another coding question
6th Nov 2022, 6:15 AM
ARBEIT MANN
ARBEIT MANN - avatar
0
Imagine a vending machine that sells fruits. Each fruit has its own number, starting from 0. Write a program for the vending machine, which will take n number as input from the customer and return the fruit with that index.If n< 0 or n>7 (the index of last fruit ), the program outputs "Wrong number". Sample Input: 2 Sample Output: banana
6th Nov 2022, 6:16 AM
ARBEIT MANN
ARBEIT MANN - avatar
0
fruits = ["apple", "cherry", "banana", "kiwi", "lemon", "pear", "peach", "avocado"] num = int(input()) if num < 0 or num > 7: print("Wrong Number") else: print(fruits[num])
6th Nov 2022, 6:29 AM
ARBEIT MANN
ARBEIT MANN - avatar
0
Well the compiler has a different opinion
6th Nov 2022, 6:48 AM
ARBEIT MANN
ARBEIT MANN - avatar
0
Test case 3 Input 12 Output Wrong Answer Expected Output Wrong Answer Thats what the compiler is saying
6th Nov 2022, 6:51 AM
ARBEIT MANN
ARBEIT MANN - avatar
0
Try this out it's an edit go the former code fruits = ["apple", "cherry", "banana", "kiwi", "lemon", "pear", "peach", "avocado"] com = ("you choose number") print(fruits) num = int(input()) if num < 0 or num > 7: print("Wrong Number") else: print(fruits[num])
6th Nov 2022, 12:27 PM
Gregory Maduagwu
Gregory Maduagwu - avatar
0
Card_type = input("Do you use an Amex or Visa card? ") if Card_type == 'Visa' and 'Amex': print('accepted') else: print("sorry your card is not in our database")
6th Nov 2022, 12:38 PM
Gregory Maduagwu
Gregory Maduagwu - avatar
0
SINKREAN VAEGAN GATES KLINßMANN If you need help, pls follow the question guidelines I mentioned before. This is vital for us to know what to help you on. About the other question: pls open a new post. Always follow the golden rule: 1 post - 1 question.
6th Nov 2022, 7:00 PM
Emerson Prado
Emerson Prado - avatar
0
Austin Gregory , your code has an error. Did it work in Code Playground? Important: pls don't give finished code as answer, because it makes the OP skip the most important part of learning process. Always give hints for the OP to find the solution.
6th Nov 2022, 7:02 PM
Emerson Prado
Emerson Prado - avatar