SlideShare a Scribd company logo
1 of 1
Download to read offline
Challenge 2: Speed Detector (Toy Problem) Write a program that takes as input the speed of a
car e.8 80. If the speed is less than 70 , it should print "Ok". Otherwise, for every 5km/s above
the speed limit (70), it should give the drive one demerit point and print the total number of
demerit points. For example, if the speed is 80 , it should print: "Points: 2 ". If the driver gets
more than 12 points, the function should print: "License suspended".

More Related Content

More from baraeaaa

chance it will be cloudy, and a 30 chance of rain. In the long run, .pdf
 chance it will be cloudy, and a 30 chance of rain. In the long run, .pdf chance it will be cloudy, and a 30 chance of rain. In the long run, .pdf
chance it will be cloudy, and a 30 chance of rain. In the long run, .pdfbaraeaaa
 
chale tie id 3.pdf
 chale tie id 3.pdf chale tie id 3.pdf
chale tie id 3.pdfbaraeaaa
 
Chapter 9 Exercise 15. Write a function my implode that works just li.pdf
 Chapter 9 Exercise 15. Write a function my implode that works just li.pdf Chapter 9 Exercise 15. Write a function my implode that works just li.pdf
Chapter 9 Exercise 15. Write a function my implode that works just li.pdfbaraeaaa
 
Centepiece Arrangemerns hat just compleded operatons for fee year end.pdf
 Centepiece Arrangemerns hat just compleded operatons for fee year end.pdf Centepiece Arrangemerns hat just compleded operatons for fee year end.pdf
Centepiece Arrangemerns hat just compleded operatons for fee year end.pdfbaraeaaa
 
Changes in Current Operating Assets and Liabilities Victor Corporatio.pdf
 Changes in Current Operating Assets and Liabilities Victor Corporatio.pdf Changes in Current Operating Assets and Liabilities Victor Corporatio.pdf
Changes in Current Operating Assets and Liabilities Victor Corporatio.pdfbaraeaaa
 
Ch. 6 (Cellular Respiration) and Ch. 13 (Microevolution) 1. This mole.pdf
 Ch. 6 (Cellular Respiration) and Ch. 13 (Microevolution) 1. This mole.pdf Ch. 6 (Cellular Respiration) and Ch. 13 (Microevolution) 1. This mole.pdf
Ch. 6 (Cellular Respiration) and Ch. 13 (Microevolution) 1. This mole.pdfbaraeaaa
 
cne tation. hiterpret the interval. The lowor bound is The upper boun.pdf
 cne tation. hiterpret the interval. The lowor bound is The upper boun.pdf cne tation. hiterpret the interval. The lowor bound is The upper boun.pdf
cne tation. hiterpret the interval. The lowor bound is The upper boun.pdfbaraeaaa
 
Collinearity Diagnostics a a. Uependent Varable Day.pdf
 Collinearity Diagnostics a a. Uependent Varable Day.pdf Collinearity Diagnostics a a. Uependent Varable Day.pdf
Collinearity Diagnostics a a. Uependent Varable Day.pdfbaraeaaa
 
Companies A and B have been offered the following rates. Company A re.pdf
 Companies A and B have been offered the following rates. Company A re.pdf Companies A and B have been offered the following rates. Company A re.pdf
Companies A and B have been offered the following rates. Company A re.pdfbaraeaaa
 
Company P has commissioned an economic torecast trom consultancy A in.pdf
 Company P has commissioned an economic torecast trom consultancy A in.pdf Company P has commissioned an economic torecast trom consultancy A in.pdf
Company P has commissioned an economic torecast trom consultancy A in.pdfbaraeaaa
 
Company C is planning to undertake another project requiring initial .pdf
 Company C is planning to undertake another project requiring initial .pdf Company C is planning to undertake another project requiring initial .pdf
Company C is planning to undertake another project requiring initial .pdfbaraeaaa
 
CLO 4 Develop the network application using socket programming. To a.pdf
 CLO 4 Develop the network application using socket programming. To a.pdf CLO 4 Develop the network application using socket programming. To a.pdf
CLO 4 Develop the network application using socket programming. To a.pdfbaraeaaa
 
Cogni WNC. has 2 million shares outstanding in the market. Umtil now,.pdf
 Cogni WNC. has 2 million shares outstanding in the market. Umtil now,.pdf Cogni WNC. has 2 million shares outstanding in the market. Umtil now,.pdf
Cogni WNC. has 2 million shares outstanding in the market. Umtil now,.pdfbaraeaaa
 
Ceit of Hotersis lewancen Under toe Froo Mehad An incomplene sibeidid.pdf
 Ceit of Hotersis lewancen Under toe Froo Mehad An incomplene sibeidid.pdf Ceit of Hotersis lewancen Under toe Froo Mehad An incomplene sibeidid.pdf
Ceit of Hotersis lewancen Under toe Froo Mehad An incomplene sibeidid.pdfbaraeaaa
 
Click the icon to view the new car sales data. Develop a multiple reg.pdf
 Click the icon to view the new car sales data. Develop a multiple reg.pdf Click the icon to view the new car sales data. Develop a multiple reg.pdf
Click the icon to view the new car sales data. Develop a multiple reg.pdfbaraeaaa
 
Click the icon to view the interest and annuity table for discrete co.pdf
 Click the icon to view the interest and annuity table for discrete co.pdf Click the icon to view the interest and annuity table for discrete co.pdf
Click the icon to view the interest and annuity table for discrete co.pdfbaraeaaa
 
Client A wants Infosys to perform a feedback survey on their customer.pdf
 Client A wants Infosys to perform a feedback survey on their customer.pdf Client A wants Infosys to perform a feedback survey on their customer.pdf
Client A wants Infosys to perform a feedback survey on their customer.pdfbaraeaaa
 
Click the icon to view a table of areas under the normal curve. z0.35.pdf
 Click the icon to view a table of areas under the normal curve. z0.35.pdf Click the icon to view a table of areas under the normal curve. z0.35.pdf
Click the icon to view a table of areas under the normal curve. z0.35.pdfbaraeaaa
 
Click this video to learn more about Mode, including No than One Mode.pdf
 Click this video to learn more about Mode, including No than One Mode.pdf Click this video to learn more about Mode, including No than One Mode.pdf
Click this video to learn more about Mode, including No than One Mode.pdfbaraeaaa
 
Click the icon to view the rating values table Click the icon to v.pdf
 Click the icon to view the rating values table Click the icon to v.pdf Click the icon to view the rating values table Click the icon to v.pdf
Click the icon to view the rating values table Click the icon to v.pdfbaraeaaa
 

More from baraeaaa (20)

chance it will be cloudy, and a 30 chance of rain. In the long run, .pdf
 chance it will be cloudy, and a 30 chance of rain. In the long run, .pdf chance it will be cloudy, and a 30 chance of rain. In the long run, .pdf
chance it will be cloudy, and a 30 chance of rain. In the long run, .pdf
 
chale tie id 3.pdf
 chale tie id 3.pdf chale tie id 3.pdf
chale tie id 3.pdf
 
Chapter 9 Exercise 15. Write a function my implode that works just li.pdf
 Chapter 9 Exercise 15. Write a function my implode that works just li.pdf Chapter 9 Exercise 15. Write a function my implode that works just li.pdf
Chapter 9 Exercise 15. Write a function my implode that works just li.pdf
 
Centepiece Arrangemerns hat just compleded operatons for fee year end.pdf
 Centepiece Arrangemerns hat just compleded operatons for fee year end.pdf Centepiece Arrangemerns hat just compleded operatons for fee year end.pdf
Centepiece Arrangemerns hat just compleded operatons for fee year end.pdf
 
Changes in Current Operating Assets and Liabilities Victor Corporatio.pdf
 Changes in Current Operating Assets and Liabilities Victor Corporatio.pdf Changes in Current Operating Assets and Liabilities Victor Corporatio.pdf
Changes in Current Operating Assets and Liabilities Victor Corporatio.pdf
 
Ch. 6 (Cellular Respiration) and Ch. 13 (Microevolution) 1. This mole.pdf
 Ch. 6 (Cellular Respiration) and Ch. 13 (Microevolution) 1. This mole.pdf Ch. 6 (Cellular Respiration) and Ch. 13 (Microevolution) 1. This mole.pdf
Ch. 6 (Cellular Respiration) and Ch. 13 (Microevolution) 1. This mole.pdf
 
cne tation. hiterpret the interval. The lowor bound is The upper boun.pdf
 cne tation. hiterpret the interval. The lowor bound is The upper boun.pdf cne tation. hiterpret the interval. The lowor bound is The upper boun.pdf
cne tation. hiterpret the interval. The lowor bound is The upper boun.pdf
 
Collinearity Diagnostics a a. Uependent Varable Day.pdf
 Collinearity Diagnostics a a. Uependent Varable Day.pdf Collinearity Diagnostics a a. Uependent Varable Day.pdf
Collinearity Diagnostics a a. Uependent Varable Day.pdf
 
Companies A and B have been offered the following rates. Company A re.pdf
 Companies A and B have been offered the following rates. Company A re.pdf Companies A and B have been offered the following rates. Company A re.pdf
Companies A and B have been offered the following rates. Company A re.pdf
 
Company P has commissioned an economic torecast trom consultancy A in.pdf
 Company P has commissioned an economic torecast trom consultancy A in.pdf Company P has commissioned an economic torecast trom consultancy A in.pdf
Company P has commissioned an economic torecast trom consultancy A in.pdf
 
Company C is planning to undertake another project requiring initial .pdf
 Company C is planning to undertake another project requiring initial .pdf Company C is planning to undertake another project requiring initial .pdf
Company C is planning to undertake another project requiring initial .pdf
 
CLO 4 Develop the network application using socket programming. To a.pdf
 CLO 4 Develop the network application using socket programming. To a.pdf CLO 4 Develop the network application using socket programming. To a.pdf
CLO 4 Develop the network application using socket programming. To a.pdf
 
Cogni WNC. has 2 million shares outstanding in the market. Umtil now,.pdf
 Cogni WNC. has 2 million shares outstanding in the market. Umtil now,.pdf Cogni WNC. has 2 million shares outstanding in the market. Umtil now,.pdf
Cogni WNC. has 2 million shares outstanding in the market. Umtil now,.pdf
 
Ceit of Hotersis lewancen Under toe Froo Mehad An incomplene sibeidid.pdf
 Ceit of Hotersis lewancen Under toe Froo Mehad An incomplene sibeidid.pdf Ceit of Hotersis lewancen Under toe Froo Mehad An incomplene sibeidid.pdf
Ceit of Hotersis lewancen Under toe Froo Mehad An incomplene sibeidid.pdf
 
Click the icon to view the new car sales data. Develop a multiple reg.pdf
 Click the icon to view the new car sales data. Develop a multiple reg.pdf Click the icon to view the new car sales data. Develop a multiple reg.pdf
Click the icon to view the new car sales data. Develop a multiple reg.pdf
 
Click the icon to view the interest and annuity table for discrete co.pdf
 Click the icon to view the interest and annuity table for discrete co.pdf Click the icon to view the interest and annuity table for discrete co.pdf
Click the icon to view the interest and annuity table for discrete co.pdf
 
Client A wants Infosys to perform a feedback survey on their customer.pdf
 Client A wants Infosys to perform a feedback survey on their customer.pdf Client A wants Infosys to perform a feedback survey on their customer.pdf
Client A wants Infosys to perform a feedback survey on their customer.pdf
 
Click the icon to view a table of areas under the normal curve. z0.35.pdf
 Click the icon to view a table of areas under the normal curve. z0.35.pdf Click the icon to view a table of areas under the normal curve. z0.35.pdf
Click the icon to view a table of areas under the normal curve. z0.35.pdf
 
Click this video to learn more about Mode, including No than One Mode.pdf
 Click this video to learn more about Mode, including No than One Mode.pdf Click this video to learn more about Mode, including No than One Mode.pdf
Click this video to learn more about Mode, including No than One Mode.pdf
 
Click the icon to view the rating values table Click the icon to v.pdf
 Click the icon to view the rating values table Click the icon to v.pdf Click the icon to view the rating values table Click the icon to v.pdf
Click the icon to view the rating values table Click the icon to v.pdf
 

Recently uploaded

Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 

Recently uploaded (20)

Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 

Challenge 2 Speed Detector (Toy Problem) Write a program that takes .pdf

  • 1. Challenge 2: Speed Detector (Toy Problem) Write a program that takes as input the speed of a car e.8 80. If the speed is less than 70 , it should print "Ok". Otherwise, for every 5km/s above the speed limit (70), it should give the drive one demerit point and print the total number of demerit points. For example, if the speed is 80 , it should print: "Points: 2 ". If the driver gets more than 12 points, the function should print: "License suspended".