SlideShare a Scribd company logo
1 of 1
Download to read offline
Python 3
Only positive numbers are permitted. Other numbers should raise a value error. The program
should use a try...except block to catch any ZeroDivisionError or ValueError exceptions that may
occur when converting the user input to integers or dividing by zero.Enter the first number: 2.3
Enter the second number: 4 You must enter valid numbers. Program Complete. Enter the first
number: 4 Enter the second number: 8 The division of 4.0 by 8. is 0.5 . Program Complete.

More Related Content

More from adyardrpradeep

More from adyardrpradeep (20)

Q1 Shale is a sedimentary rock a protolith of slate whic.pdf
Q1 Shale is a sedimentary rock a protolith of slate whic.pdfQ1 Shale is a sedimentary rock a protolith of slate whic.pdf
Q1 Shale is a sedimentary rock a protolith of slate whic.pdf
 
Q2 Mention whether the following instructions are right or.pdf
Q2  Mention whether the following instructions are right or.pdfQ2  Mention whether the following instructions are right or.pdf
Q2 Mention whether the following instructions are right or.pdf
 
Q2 5 marks An educational researcher believes that the me.pdf
Q2 5 marks An educational researcher believes that the me.pdfQ2 5 marks An educational researcher believes that the me.pdf
Q2 5 marks An educational researcher believes that the me.pdf
 
Q1 We read many accounts this week of what emerging indepen.pdf
Q1 We read many accounts this week of what emerging indepen.pdfQ1 We read many accounts this week of what emerging indepen.pdf
Q1 We read many accounts this week of what emerging indepen.pdf
 
Q1Unaudited information about significant events and uncer.pdf
Q1Unaudited information about significant events and uncer.pdfQ1Unaudited information about significant events and uncer.pdf
Q1Unaudited information about significant events and uncer.pdf
 
Q1413 What is the structure in coordinates J25 and J10 .pdf
Q1413 What is the structure in coordinates J25 and J10 .pdfQ1413 What is the structure in coordinates J25 and J10 .pdf
Q1413 What is the structure in coordinates J25 and J10 .pdf
 
q10 Euromarket investment and fund raising A USbased mult.pdf
q10 Euromarket investment and fund raising A USbased mult.pdfq10 Euromarket investment and fund raising A USbased mult.pdf
q10 Euromarket investment and fund raising A USbased mult.pdf
 
Q10 What is the value of the variable message in the foll.pdf
Q10 What is the value of the variable message in the foll.pdfQ10 What is the value of the variable message in the foll.pdf
Q10 What is the value of the variable message in the foll.pdf
 
Q1 Write a python function that gets a list as an input an.pdf
Q1 Write a python function that gets a list as an input an.pdfQ1 Write a python function that gets a list as an input an.pdf
Q1 Write a python function that gets a list as an input an.pdf
 
Q10 Calculate return on capital when earnings before interes.pdf
Q10 Calculate return on capital when earnings before interes.pdfQ10 Calculate return on capital when earnings before interes.pdf
Q10 Calculate return on capital when earnings before interes.pdf
 
Q1 Write the genotype of an individual who is homozygous re.pdf
Q1 Write the genotype of an individual who is homozygous re.pdfQ1 Write the genotype of an individual who is homozygous re.pdf
Q1 Write the genotype of an individual who is homozygous re.pdf
 
Q1 Which of the following statements is true about perfectl.pdf
Q1 Which of the following statements is true about perfectl.pdfQ1 Which of the following statements is true about perfectl.pdf
Q1 Which of the following statements is true about perfectl.pdf
 
Q1 Use Breadth First Search to find the path from S to G .pdf
Q1 Use Breadth First Search to find the path from S to G .pdfQ1 Use Breadth First Search to find the path from S to G .pdf
Q1 Use Breadth First Search to find the path from S to G .pdf
 
Q Write comprehensive brief notes on each of the following .pdf
Q Write comprehensive brief notes on each of the following .pdfQ Write comprehensive brief notes on each of the following .pdf
Q Write comprehensive brief notes on each of the following .pdf
 
Q1 5 marks 10 people are randomly selected to taste two b.pdf
Q1 5 marks 10 people are randomly selected to taste two b.pdfQ1 5 marks 10 people are randomly selected to taste two b.pdf
Q1 5 marks 10 people are randomly selected to taste two b.pdf
 
python only plz 1 25 pts Define a function called hellowo.pdf
python only plz 1 25 pts Define a function called hellowo.pdfpython only plz 1 25 pts Define a function called hellowo.pdf
python only plz 1 25 pts Define a function called hellowo.pdf
 
Put the steps of the lightdependent reactions of photosynth.pdf
Put the steps of the lightdependent reactions of photosynth.pdfPut the steps of the lightdependent reactions of photosynth.pdf
Put the steps of the lightdependent reactions of photosynth.pdf
 
Q1 Match the following Terms with their corresponding Defin.pdf
Q1 Match the following Terms with their corresponding Defin.pdfQ1 Match the following Terms with their corresponding Defin.pdf
Q1 Match the following Terms with their corresponding Defin.pdf
 
Q1 Shinsei Bank used the pathbased approach so a What.pdf
Q1 Shinsei Bank used the pathbased approach so a What.pdfQ1 Shinsei Bank used the pathbased approach so a What.pdf
Q1 Shinsei Bank used the pathbased approach so a What.pdf
 
python help please not sure why code is not working for the.pdf
python help please not sure why code is not working for the.pdfpython help please not sure why code is not working for the.pdf
python help please not sure why code is not working for the.pdf
 

Recently uploaded

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 

Recently uploaded (20)

An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17
 

Python 3 Only positive numbers are permitted Other number.pdf

  • 1. Python 3 Only positive numbers are permitted. Other numbers should raise a value error. The program should use a try...except block to catch any ZeroDivisionError or ValueError exceptions that may occur when converting the user input to integers or dividing by zero.Enter the first number: 2.3 Enter the second number: 4 You must enter valid numbers. Program Complete. Enter the first number: 4 Enter the second number: 8 The division of 4.0 by 8. is 0.5 . Program Complete.