SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
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".

Contenu connexe

Plus de 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
 

Plus de 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
 

Dernier

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
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
 
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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
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
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
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
 
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
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
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
 

Dernier (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
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
 
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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
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
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
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
 
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
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
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
 

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".