+ 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")

26th Sep 2021, 7:09 PM
Chrisu K
Chrisu K - avatar
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.
26th Sep 2021, 7:27 PM
Coding Cat
Coding Cat - avatar
+ 6
Hafsa Maryam , your code is correct and is running properly in the code coach exercise.
7th Oct 2022, 8:41 PM
Lothar
Lothar - avatar
+ 5
Chrisu K , can you please complete your post by adding the name of the python tutorial and also the lesson / exercise number? thanks for your understanding!
26th Sep 2021, 7:19 PM
Lothar
Lothar - avatar
+ 5
type = input() #your code goes here if type == "Visa" or type=="Amex" : print("accepted")
29th Sep 2021, 6:14 AM
Bernard Towindo
Bernard Towindo - avatar
+ 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 ???
15th Nov 2022, 12:09 PM
Lothar
Lothar - avatar
+ 2
+1 type = input() #your code goes here if type == "Visa" or type=="Amex" : print("accepted")
17th May 2022, 2:58 AM
Najwan Najmussabah
+ 1
Python Core \\ Control Structures \\ 22.2 Practice \\ Financial Transactions https://www.sololearn.com/learning/1073/2280/4580/1
26th Sep 2021, 7:26 PM
Chrisu K
Chrisu K - avatar
+ 1
@Coding Cat Got it right. Thank you for helping!
26th Sep 2021, 7:47 PM
Chrisu K
Chrisu K - avatar
0
Chrisu K you're welcome
26th Sep 2021, 8:08 PM
Coding Cat
Coding Cat - avatar
0
card=input('Enter the type of card you have: ') if(card=='Amex' or card=='Visa'): print('Accepted') else: print(' ')
21st Dec 2021, 4:58 PM
SANVIKA
0
type = input() if type == "Visa" or type == "Amex": print("accepted")
8th Jan 2022, 1:55 PM
Ihor Princ
Ihor Princ - avatar
0
type = input() #your code goes here if (type=="Visa" or type=="Amex"): print("accepted")
20th Apr 2022, 9:39 AM
ELMISANI
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.
7th Oct 2022, 5:24 PM
Hafsa Maryam
0
type = input() #your code goes here if type == "Visa" or type=="Amex" : print("accepted")
15th Nov 2022, 11:32 AM
Pooja Patel
Pooja Patel - avatar
0
type = input() #your code goes here if type == ("Visa") or type==("Amex"): print("accepted") This will work.
18th Nov 2022, 11:33 AM
Ionut Laurian Iscru
Ionut Laurian Iscru - avatar
0
type = input() if type =="Visa" Or type == "Amex": print("Accepted")
6th Jan 2023, 9:29 AM
Thon K. Giet
Thon K. Giet - avatar