All Pro Web Designs > > Learning Tutorials > Programming Languages > Python > Python Beginner Tutorial 9 (Range)
Video Title: Python Beginner Tutorial 9 For Absolute Beginners – (Range)
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
lol im not a beginner so i know all of this but before i studied and when I tryed to make a project i did not understand
Dude, I'm a beginner and all this is super new to me. Thanks for taking your time to upload these vids. They are helping me to understand more or less the programming stuff. Keep up the good work Chris.
And found this one 😉
for i in range(99, 0, -1):
if i == 1:
print('1 bottle of beer on the wall, 1 bottle of beer!')
print('So take it down, pass it around, no more bottles of beer on the wall!')
elif i == 2:
print('2 more bottles of beer on the wall, 2 more bottles of beer!')
print('So take one down, pass it around, 1 more bottle of beer on the wall!')
else:
print('{0} bottles of beer on the wall, {0} bottles of beer!'.format(i))
print('So take it down, pass it around, {0} more bottles of beer on the wall!'.format(i – 1))
my_list = ['one', 'two', 'three', 'four', 'five']
my_list_len = len(my_list)
for x in range(0, my_list_len):
print(my_list[x])
Actually the things that you have told in this video is ok but it don't have any connection to our list that we have defined so we have to take loop variable as a index in out list then it will print the exact solution that we want. like my_list[x]
hey chirs i used the same code showen in the video but my list had value like [5,3,4,9] still my output was from range 1 to 4 that is
1
2
3
4
if you want to go to 10 do I have to type 11. yep it work even I don't have my_list = to 11 just 10
I can't place breakpoints as of recently. They don't appear or get placed when I hover my mouse or click over the breakpoint margin.
In the bottom of the debug window, in the section titled 'breakpoints' there are two options:
– All exceptions &
– Uncaught exceptions
I remember there being a third option but this is no longer there. I think this is the reason for me not being able to place breakpoints anymore. If anyone has any idea how to restore this, advice would be much appreciated 🙂
how is my list related to the loop??
You are an idiot. my_list has nothing to do with the range. Use the following code and it still works:
for x in range(1, 25):
print(x)
How does the for loop know it's picking up elements from my_list??
As sowmith gantla said, there's no relationship between that list and the for loop. This confused me initially as I couldn't see how the loop was connecting to the list. You can leave that list out completely and get the exact same results.
From what I can see range() is a counting function that has up to 3 arguments:
1: range(7) will count from zero to the last integer before 7, so the for loop outputs 0 through 6
2: range(3, 7) starts at the first number and ends before the second, so output is 3 through 6
3: range(3, 7, 2) starts at the first and counts up to the second by increments of 2, so output is 3 and 5.
what if there are multiple list, can we still directly use the command range??
my_list has nothing to do with for loop there is no connection.
someone with no prior knowledge of programming language cant understand whats going on in the program.
It would be better to use print(my_list[x]) instead of print(x) and use some names in the list.
thx dude 🙂 I am in a programming school and your videos really helped me haha
do the values in "range" have to be numbers even if the values in the list are words?
Was the inclusion of the list just a visual example to show how indexing works?
The range(1, 5) representing [1,2,3,4] is mainly to make it in line with how things are done in other languages and to make sure the indices makes sense when using array slicing because array indices start at 0, not 1. "for i in range(5)" is the same as "for i in range(0, 5)" and will do 5 iterations. This can easily be mentally mapped to "for(int i = 0; i < 5; i++)". Python have borrowed a lot of things from other languages 🙂
In python2, range created a actual list in memory while xrange created a generator. In python3 they deleted range and renamed xrange to range. They only kept the generator version. You can see that in interactive mode when doing a "my_list = range(10)". Printing my_list just outputs the string "range(10)". To make an actual list you have to pass the range generator object into the list() constructor. A lot of things in python3 is like that. They made everything into generators to make it faster and less memory-hogging.