Question: Write a Python function called check _ voting _ eligibility that takes two parameters: age ( an integer ) and citizenship ( a string representing

Write a Python function called check_voting_eligibility that takes two parameters: age (an integer) and citizenship (a string representing the country of citizenship).
The function should determine whether the person is eligible to vote based on the following criteria:
The person must be at least 18 years old.
The person must be a citizen of the given country (specified by the citizenship parameter).
Task 1: Voting Eligibility Check Function
Write a Python function called check_voting_eligibility that takes two parameters: age (an integer) and citizenship (a string representing the country of citizenship).
The function should determine whether the person is eligible to vote based on the following criteria:
- The person must be at least 18 years old.
- The person must be a citizen of the given country (specified by the citizenship parameter).
\#complete the code below using if... else and return the value def check_voting_eligibility(age, citizenship):
if
\# Example usage:
print(check_voting_eligibility(20, "USA"))
Task 2: Airline Passenger Discount Function
Create a Python function named check_airline_discount that takes one parameter: age (an integer representing the passenger's age).
The function should determine whether the passenger qualifies for a \(\mathbf{25\%}\) discount on their airline ticket based on the following criteria:
- Passengers older than 65 years are eligible for the discount.
\# complete the code below using if.. else and return the value def check_airline_discount(age): Task 1: Voting Eligibility Check Function
Write a Python function called check_voting_eligibility that takes two parameters: age (an integer) and citizenship (a string representing the country of citizenship).
The function should determine whether the person is eligible to vote based on the following criteria:
- The person must be at least 18 years old.
- The person must be a citizen of the given country (specified by the citizenship parameter).
[]:
\#complete the code below using if... else and return the value
def check_voting_eligibility(age, citizenship):
if|
[]: \# Example usage:
print(check_voting_eligibility(20, "USA"))
Task 2: Airline Passenger Discount Function
Create a Python function named check_airline_discount that takes one parameter: age (an integer representing the passenger's age).
The function should determine whether the passenger qualifies for a \(25\%\) discount on their airline ticket based on the following criteria:
- Passengers older than 65 years are eligible for the discount.
```
[]: # complete the code below using if.. else and return the value
def check_airline_discount(age):
```
```
[]: # Example usage:
print(check_airline_discount(70))
``` Module 9 writing functions
This assignment covers various topics, including functions, conditional statements, user input, and basic arithmetic operations.
Submission Instructions:
- Implement each function in a separate code cell below.
- Test each function with appropriate inputs to ensure correctness.
- Submit your completed assignment on Canvas
Task 1: Voting Eligibility Check Function
Write a Python function called check_voting_eligibility that takes two parameters: age (an integer) and citizenship (a string representing the country of citizenship).
The function should determine whether the person is eligible to vote based on the following criteria:
- The person must be at least 18 years old.
- The person must be a citizen of the given country (specified by the citizenship parameter).
\#complete the code below using if... else and return the value
def check_voting_eligibility(age, citizenship):
Task 2: Airline Passenger Discount Function
Create a Python function named check_airline_discount that takes one parameter: age (an integer representing the passenger's age).
The function should determine whether the passenger qualifies for a \(25\%\) discount on their airline ticket based on the following criteria:
- Passengers older than 65 years are eligible for the discount.
Write a Python function called check _ voting _

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!