CodingBat sorta_sum answer - Python Logic 1

Published: 08 June 2021
on channel: Brendan Metcalfe
470
11

CodingBat.com sorta_sum solution explained in Python.

CodingBat Python Logic-1 sorta_sum answer.

Timestamps:
0:00-0:29 The Question
0:30-0:53 Analyze Question
0:54-1:53 1st If Statement
1:54-2:17 2nd Statement
2:18-2:33 1st Solution
2:34-3:00 Refactor 1st If Statement
3:01-4:11 Solution with Range() Function
4:12-4:49 2nd Refactor
4:50 Final solution

sorta_sum question:
Given 2 ints, a and b, return their sum. However, sums in the range 10..19 inclusive, are forbidden, so in that case just return 20.

sorta_sum(3, 4) → 7
sorta_sum(9, 4) → 20
sorta_sum(10, 11) → 21

💻 sorta_sum - link to original question on CodingBat.com:
https://codingbat.com/prob/p116620

💻 Python String Methods Course Playlist:
   • Python String Methods - Tutorial Series  

💻 Python List Methods Course Playlist:
   • Python List Methods  

📖 Please check out my Udemy course here:
https://www.udemy.com/course/the-pyth...

⚙️ Recommended Computer Gear:
Macbook Pro 13" https://amzn.to/39ZGrTb
Macbook screen protector https://amzn.to/3s2a9x3
Macbook USB-C adapter https://amzn.to/3dRICtd
Macbook case https://amzn.to/3wMJhVk
Foldable computer stand https://amzn.to/2QeCi76
Airpods https://amzn.to/324gPAs
Pixel 3a https://amzn.to/2PJa1Wr
Pixel 3a screen protector https://amzn.to/3mytvcf
Lapel Mic https://amzn.to/39Vf2lx
Bluelight computer glasses https://amzn.to/3dSCIId
Noise cancelling headphones https://amzn.to/2QhAR80
JBL bluetooth speaker https://amzn.to/3dVfLEv

✈️ Recommended Digital Nomad Gear:
Shorts with zippers https://amzn.to/3wHEepf
Silicone earplugs https://amzn.to/3wSSzQ3
Sleep mask https://amzn.to/3d6AUw5
Packing cubes https://amzn.to/3uCbaOc
Sink plug https://amzn.to/2QeiSzf
Travel lock https://amzn.to/3t2Zsf4
Nike sandals https://amzn.to/3d65FRV
Nike freeruns https://amzn.to/3fZRWhi
Thin no-show socks https://amzn.to/39Wa8og
Quest bars https://amzn.to/3s8eWxd
Incense https://amzn.to/3dPfEKF
Electronics organizer bag https://amzn.to/3tbn3KO


Watch video CodingBat sorta_sum answer - Python Logic 1 online, duration hours minute second in high quality that is uploaded to the channel Brendan Metcalfe 08 June 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 470 times and liked it 11 visitors.