SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
INPUTVALIDATION WITH IF-ELIF-ELSE STATEMENTS Example 9: Program uses the
method isdigit to guard against improper input. 11. Request two nurbern and tind their sua.
Validate the input. numi = 1nput ("Enter firat number: ") num2 = 1nput ("Enter second number:
") # Display sum if entries are valid. Othervise, inform i the user where strvalid entries were
made. if nun1,1sdigit () and num2,1sdigit () : print ("The sum 1sm,str (eval (num1) + eval
(nun2)) +=") el1f not num1. 1sdigit () : if not num2, 1 adigit () : print("Nesther entry was a
proper number.") else:
Example 9: Program uses the method isdigit to guard against improper input.

Weitere ähnliche Inhalte

Mehr von ALANKARSTEELINDUSTRI

Inorganic phosphorous is a naturally occurring element in all plants .pdf
 Inorganic phosphorous is a naturally occurring element in all plants .pdf Inorganic phosphorous is a naturally occurring element in all plants .pdf
Inorganic phosphorous is a naturally occurring element in all plants .pdfALANKARSTEELINDUSTRI
 
information flows within your job. Find out 1. the chart of accounts.pdf
 information flows within your job. Find out 1. the chart of accounts.pdf information flows within your job. Find out 1. the chart of accounts.pdf
information flows within your job. Find out 1. the chart of accounts.pdfALANKARSTEELINDUSTRI
 
Information about light in the outside world is used to tune the brai.pdf
 Information about light in the outside world is used to tune the brai.pdf Information about light in the outside world is used to tune the brai.pdf
Information about light in the outside world is used to tune the brai.pdfALANKARSTEELINDUSTRI
 
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 Infection control 16. Chain of infection 17. Factors that increase ho.pdf Infection control 16. Chain of infection 17. Factors that increase ho.pdf
Infection control 16. Chain of infection 17. Factors that increase ho.pdfALANKARSTEELINDUSTRI
 
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdfALANKARSTEELINDUSTRI
 
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 Larger raindrops fall than smaller raindrops. slower faster Questio.pdf Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
Larger raindrops fall than smaller raindrops. slower faster Questio.pdfALANKARSTEELINDUSTRI
 
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdfALANKARSTEELINDUSTRI
 
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdfALANKARSTEELINDUSTRI
 
Komal borrows $14,000 from her father to open her accounting practice.pdf
 Komal borrows $14,000 from her father to open her accounting practice.pdf Komal borrows $14,000 from her father to open her accounting practice.pdf
Komal borrows $14,000 from her father to open her accounting practice.pdfALANKARSTEELINDUSTRI
 
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdfALANKARSTEELINDUSTRI
 
Kingbird Co. has the following defined benefit pension plan balances .pdf
 Kingbird Co. has the following defined benefit pension plan balances .pdf Kingbird Co. has the following defined benefit pension plan balances .pdf
Kingbird Co. has the following defined benefit pension plan balances .pdfALANKARSTEELINDUSTRI
 
Kara categorized her spending for this month into four categories Re.pdf
 Kara categorized her spending for this month into four categories Re.pdf Kara categorized her spending for this month into four categories Re.pdf
Kara categorized her spending for this month into four categories Re.pdfALANKARSTEELINDUSTRI
 
Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf
 Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf
Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdfALANKARSTEELINDUSTRI
 
Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf
 Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf
Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdfALANKARSTEELINDUSTRI
 
JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf
 JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf
JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdfALANKARSTEELINDUSTRI
 
Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf
 Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf
Jenny (15 years old) is one of two beneficiaries of Trust B created.pdfALANKARSTEELINDUSTRI
 
JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
 JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
JCL Inc. Is a major chip manufacturing firm that sells its products t.pdfALANKARSTEELINDUSTRI
 
In the register there is a prolonged open phase. A. modal; falsetto B.pdf
 In the register there is a prolonged open phase. A. modal; falsetto B.pdf In the register there is a prolonged open phase. A. modal; falsetto B.pdf
In the register there is a prolonged open phase. A. modal; falsetto B.pdfALANKARSTEELINDUSTRI
 
J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf
 J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf
J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdfALANKARSTEELINDUSTRI
 
Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf
 Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf
Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdfALANKARSTEELINDUSTRI
 

Mehr von ALANKARSTEELINDUSTRI (20)

Inorganic phosphorous is a naturally occurring element in all plants .pdf
 Inorganic phosphorous is a naturally occurring element in all plants .pdf Inorganic phosphorous is a naturally occurring element in all plants .pdf
Inorganic phosphorous is a naturally occurring element in all plants .pdf
 
information flows within your job. Find out 1. the chart of accounts.pdf
 information flows within your job. Find out 1. the chart of accounts.pdf information flows within your job. Find out 1. the chart of accounts.pdf
information flows within your job. Find out 1. the chart of accounts.pdf
 
Information about light in the outside world is used to tune the brai.pdf
 Information about light in the outside world is used to tune the brai.pdf Information about light in the outside world is used to tune the brai.pdf
Information about light in the outside world is used to tune the brai.pdf
 
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 Infection control 16. Chain of infection 17. Factors that increase ho.pdf Infection control 16. Chain of infection 17. Factors that increase ho.pdf
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 Larger raindrops fall than smaller raindrops. slower faster Questio.pdf Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 
Komal borrows $14,000 from her father to open her accounting practice.pdf
 Komal borrows $14,000 from her father to open her accounting practice.pdf Komal borrows $14,000 from her father to open her accounting practice.pdf
Komal borrows $14,000 from her father to open her accounting practice.pdf
 
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 
Kingbird Co. has the following defined benefit pension plan balances .pdf
 Kingbird Co. has the following defined benefit pension plan balances .pdf Kingbird Co. has the following defined benefit pension plan balances .pdf
Kingbird Co. has the following defined benefit pension plan balances .pdf
 
Kara categorized her spending for this month into four categories Re.pdf
 Kara categorized her spending for this month into four categories Re.pdf Kara categorized her spending for this month into four categories Re.pdf
Kara categorized her spending for this month into four categories Re.pdf
 
Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf
 Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf
Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf
 
Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf
 Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf
Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf
 
JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf
 JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf
JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf
 
Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf
 Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf
Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf
 
JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
 JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
 
In the register there is a prolonged open phase. A. modal; falsetto B.pdf
 In the register there is a prolonged open phase. A. modal; falsetto B.pdf In the register there is a prolonged open phase. A. modal; falsetto B.pdf
In the register there is a prolonged open phase. A. modal; falsetto B.pdf
 
J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf
 J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf
J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf
 
Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf
 Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf
Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf
 

Kürzlich hochgeladen

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Kürzlich hochgeladen (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

INPUTVALIDATION WITH IF-ELIF-ELSE STATEMENTS Example 9 Program uses .pdf

  • 1. INPUTVALIDATION WITH IF-ELIF-ELSE STATEMENTS Example 9: Program uses the method isdigit to guard against improper input. 11. Request two nurbern and tind their sua. Validate the input. numi = 1nput ("Enter firat number: ") num2 = 1nput ("Enter second number: ") # Display sum if entries are valid. Othervise, inform i the user where strvalid entries were made. if nun1,1sdigit () and num2,1sdigit () : print ("The sum 1sm,str (eval (num1) + eval (nun2)) +=") el1f not num1. 1sdigit () : if not num2, 1 adigit () : print("Nesther entry was a proper number.") else: Example 9: Program uses the method isdigit to guard against improper input.