Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python function valid _ jawal to validate whether a string entered by the user is a valid Palestinian Jawal mobile number: In international

Write a Python function valid_jawal to validate whether a string entered by the user is a valid Palestinian Jawal mobile number:
In international format the valid Palestinian Jawal mobile number starts with 0097059 or +97059 plus 7 digits (numbers) for example, 00970591231111(14 chars) or +970592224545(13chars)
In local format Jawal mobile numbers starts with 059 plus 7 digits(numbers) for example, 0591234562(10 chars)
The function will return True for valid Jawal mobile number and False otherwise.
Then ask the user to enter a list of Jawal numbers from the keyboard in one line and save it in a list L1.
Use the function valid_jawal to check all L1 numbers and add all valid Jawal numbers to a new list L2 and add all invalid numbers to a List L3
Print L2 and L3 using the format as in the following example.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

1. How should the committee prepare for the elections?

Answered: 1 week ago