Python
  • Getting Started
    • Input and Output
    • Variables
    • Data Types
    • Conditional Structures
      • Humidity Level
      • Financial Transactions
      • Fruit-Vending Machine
      • Magic While
      • FizzBuzz
    • Functions
      • Hashtag Generator
  • Data Structures
    • Lists
    • Dictionary
    • Set
    • Interpreter Expressions
  • OOPs
    • Classes and Objects
    • Exception Handling
      • Simple Calculator
  • System Programming
    • File Operations
    • Directory Navigation
    • Process Creation
    • Threads
Powered by GitBook
On this page
  1. Getting Started
  2. Conditional Structures

Financial Transactions

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

type = input()
#your code goes here
if type == "Visa" or type == "Amex":
    print("accepted")
PreviousHumidity LevelNextFruit-Vending Machine

Last updated 2 years ago