+ 1
Financial Transactions / Chaining Multiple Conditions
I don't seem to understand this. Can someone help me out? "Using an ATM, customers can access their bank deposits or credit accounts to do a variety of financial transactions. You serve ATMs that accept only Visa and Amex bank cards. The given program takes the type of a bank card as input. Task Complete the program to output "accepted" if the card is Visa or Amex. Don't output anything otherwise." type = input() #your code goes here if type == ("Visa" or "Amex") : print("accepted")
16 Answers
+ 10
if type == ("Visa" or "Amex"):
is not the way how it works.
You have to check both conditions
if type == Visa or type == Amex.
Something like this.
Have a try.
+ 6
Hafsa Maryam ,
your code is correct and is running properly in the code coach exercise.
+ 5
type = input()
#your code goes here
if type == "Visa" or type=="Amex" :
print("accepted")
+ 5
Pooja Patel ,
the code you have posted here looks 100% identical to a post from Najwan Najmussabah that he has posted 6 months ago in the current post.
> did you just copy and paste it ???
+ 2
+1
type = input()
#your code goes here
if type == "Visa" or type=="Amex" :
print("accepted")
+ 1
Python Core \\ Control Structures \\ 22.2 Practice \\ Financial Transactions
https://www.sololearn.com/learning/1073/2280/4580/1
+ 1
@Coding Cat Got it right. Thank you for helping!
0
Chrisu K you're welcome
0
card=input('Enter the type of card you have: ')
if(card=='Amex' or card=='Visa'):
print('Accepted')
else:
print(' ')
0
type = input()
if type == "Visa" or type == "Amex":
print("accepted")
0
type = input()
#your code goes here
if (type=="Visa" or type=="Amex"):
print("accepted")
0
type = input()
#your code goes here
if (type=="Visa" or type=="Amex"):
print("accepted")
I write this code but still its giving me error how can I sole it.
0
type = input()
#your code goes here
if type == "Visa" or type=="Amex" :
print("accepted")
0
type = input()
#your code goes here
if type == ("Visa") or type==("Amex"):
print("accepted")
This will work.
0
type = input()
if type =="Visa" Or type == "Amex":
print("Accepted")