Skip to content

MyUstaadG

Learn to Serve

  • Computer Science
    • Software
    • Computer Tips
    • Coding
      • Conditional Structures Exercises
      • Loops Exercises
      • Arrays Exercises
      • Python Exercises
    • Microsoft Office
      • MS Excel
      • MS Word
  • Videos
    • Funny Videos
    • Health and Fitness Videos
    • PUBG Videos
    • Technology Videos
  • News
  • Funny
  • Memes
  • Playwright Tutorials
  • Tutorials
  • Toggle search form

Write a program that asks the user their age and monthly income and shows on the screen whether the user has to pay taxes or not | Python Programming

Posted on March 23, 2022March 23, 2022 By myustaadg.com
Spread the love

Conditional Structure Exercises

To pay a certain tax you must be over 16 years old and have an income equal to or greater than € 1000 per month. Write a program that asks the user their age and monthly income and shows on the screen whether the user has to pay taxes or not.

Solution:

Method 01:

age = int(input("What is your age?"))
income = float(input("What is your monthly income?"))
if age > 16 and income >= 1000:
    print("You have to Pay")
else:
    print("You don't have to pay")

Output:

Method 01 Output

Method 02:

age = int(input("What is your age?"))
income = float(input("What is your monthly income?"))
if age <= 16 or income < 1000:
    print("You don't have to Pay")
else:
    print("You have to Pay")

Output:

Method 02 Output
Click Here For Direct Solution on Colab

#colab

#Python Programming Importance

Hope You will learn Something. Happy Coding

Programming Exercises, Python Exercises Tags:conditional exercises, conditional statment solved exerciese in python, conditional statments, conditional statments in python, conditional Structure, conditional structure codes in python, conditional structures in python, easy python lectures, easy python tutorials, python lectures, python programming, python programming tutorials, pyton lectures for beginner, Write a program that asks the user their age and monthly income and shows on the screen whether the user has to pay taxes or not in Python Programming, Write a program that asks the user their age and monthly income and shows on the screen whether the user has to pay taxes or not.

Post navigation

Previous Post: Write a program that asks the user for an integer and shows on the screen whether it is even or odd | Python Programming
Next Post: Write a program that asks the user their annual income and shows on the screen the tax rate that corresponds to them | Python Programming

More Related Articles

Write a program that inputs values into a one-dimensional array of ten elements. Draws a bar chart or histogram. Arrays Exercises
Write a program that reads a positive integer, , entered by the user and then displays on the screen the sum of all integers from 1 to . The sum of the positive first integers can be calculated as follows: Sum =n(n+1)/2 | python Programming Programming Exercises
Write a program that sorts an array in ascending order by passing the array to a function. Arrays Exercises
Write a program to initialize values in two tables A and B. Multiply matrix A and B and store results into table C | Multiplication of matrices. Arrays Exercises
Write a program that inputs data into a table and displays it on the screen in tabular form. Arrays Exercises
Write a program that inputs employees code, names, and salaries of 10 employees in three arrays ‘code’, ‘name’, and ‘salary’ It computes the net salary. Arrays Exercises

Copyright © 2022 MyUstaadG.

Powered by PressBook Blog WordPress theme