I came from you flip-flop series videos just to say thank you for your work. It is very much appreciated, even your work from 4-6 years ago. My professor is an idiot, he doesn't understand that learning requires time and thoroughness. He uses "independent learning" as a way to avoid teaching certain topics. Thank you for patching the holes in my education, free of charge.
Very powerful learning experience with your vids. Lot's of notes again. Amazes me how you can next built in Functions. Time to make a sandwich and get to # 5....Thanks so much....JT
Thanks. Great tutorial. But I can see that you dragged the form plenty of times to show the code and form at the same time. You can either set the form's start position property to center of the screen or programmatically set the position wherever you want. If an expression returns a boolean value, you don't need to use "= Flase" or "=True" after an If statement. Just use "If IsNumeric(blablah) Then DothisJob". That's all.
Thank you. I'm planning on doing a video about forms and form controls soon. I plan to cover repositioning and resizing in that video. Thanks for reminding me about the default start position property, I will mention that too. When I'm coding for myself, I would write something like 'If bFlag Then', or 'If Not bFlag Then' but when I'm teaching new students I encourage them to write 'If bFlag = True Then' or 'If bFlag = False Then'. I tend to be explicit about true and false to begin with. I also think it helps to reinforce the concept that a function like IsNumeric returns a boolean value. You've given me an idea though, I might do a video on coding shortcuts later. :)KD
Perfect! I was just working on some code using the Rnd() function and had some trouble. This helped me out as I didn't know about the Math tagline. I was trying random from 1 to 6 but using CInt() I was getting values 1 thru 7. A question, I know you didn't mention it here but should Randomize() be used prior to each instance of Rnd(), once at the form level or would it work placing it at the global level?
Randomize pulls a new seed, so you only need to use it once. It helps ensure the "randomness" by pulling a value from the CPU's clock at the time you Randomize. However, it's not strictly necessary.
Hi Shima. Thanks for commenting. Machine learning/AI is something I am working on (albeit slowly). In the meantime, the AI section of your course requires an understanding of A* and Dijkstra's pathfinding algorithms which I have made some videos about. Take your time with these, these are quite complex; you need not concern yourself with the program code for these, just the algorithms. :)KD
In the assignment statement i = CInt(Math.Ceiling(Rnd() *6)), why are you using Cint () to make sure the expression evaluates to an integer in (1...6) when the expression Math.Ceiling(Rnd() *6) evaluates to an integer in (1...6), "...Visual Basic Rnd() function, that returns a floating-point value between 0.0 and 1.0." I spent some time trying to figure this out.
@@ComputerScienceLessons Thanks for the reply. I just wanted to make sure I didn't miss some important peculiarity in one of those functions that would have consequences in my coding.
hi. Can you help me to understand how to use NumberFormatInfo to replace "." with "," tha is in a variable? Fo example Dim a As String : a = "25.3" Dim b As Decimal b = CDec(a) MsgBox(b) I'll get a mistake. Because the separator of my system is "," Thank you
I came from you flip-flop series videos just to say thank you for your work. It is very much appreciated, even your work from 4-6 years ago. My professor is an idiot, he doesn't understand that learning requires time and thoroughness. He uses "independent learning" as a way to avoid teaching certain topics. Thank you for patching the holes in my education, free of charge.
Very powerful learning experience with your vids. Lot's of notes again. Amazes me how you can next built in Functions. Time to make a sandwich and get to # 5....Thanks so much....JT
Can you start working back on your Python Programming Playlist too...? Your work is commendable...!
I will indeed :)KD
Thanks. Great tutorial. But I can see that you dragged the form plenty of times to show the code and form at the same time. You can either set the form's start position property to center of the screen or programmatically set the position wherever you want.
If an expression returns a boolean value, you don't need to use "= Flase" or "=True" after an If statement. Just use "If IsNumeric(blablah) Then DothisJob". That's all.
Thank you. I'm planning on doing a video about forms and form controls soon. I plan to cover repositioning and resizing in that video. Thanks for reminding me about the default start position property, I will mention that too. When I'm coding for myself, I would write something like 'If bFlag Then', or 'If Not bFlag Then' but when I'm teaching new students I encourage them to write 'If bFlag = True Then' or 'If bFlag = False Then'. I tend to be explicit about true and false to begin with. I also think it helps to reinforce the concept that a function like IsNumeric returns a boolean value. You've given me an idea though, I might do a video on coding shortcuts later. :)KD
Thank you
You're welcome :)KD
Perfect! I was just working on some code using the Rnd() function and had some trouble. This helped me out as I didn't know about the Math tagline. I was trying random from 1 to 6 but using CInt() I was getting values 1 thru 7. A question, I know you didn't mention it here but should Randomize() be used prior to each instance of Rnd(), once at the form level or would it work placing it at the global level?
Randomize pulls a new seed, so you only need to use it once. It helps ensure the "randomness" by pulling a value from the CPU's clock at the time you Randomize. However, it's not strictly necessary.
Love it!
Also it would be so nice if you could make videos on 'Software Development' & 'Artificial Intelligence' CIE AS Level 9618
Hi Shima. Thanks for commenting. Machine learning/AI is something I am working on (albeit slowly). In the meantime, the AI section of your course requires an understanding of A* and Dijkstra's pathfinding algorithms which I have made some videos about. Take your time with these, these are quite complex; you need not concern yourself with the program code for these, just the algorithms. :)KD
In the assignment statement i = CInt(Math.Ceiling(Rnd() *6)), why are you using Cint () to make sure the expression evaluates to an integer in (1...6) when the expression Math.Ceiling(Rnd() *6) evaluates to an integer in (1...6), "...Visual Basic Rnd() function, that returns a floating-point value between 0.0 and 1.0." I spent some time trying to figure this out.
You're quite correct. wrapping it all up in CInt is overkill. I stand corrected :)KD
@@ComputerScienceLessons Thanks for the reply. I just wanted to make sure I didn't miss some important peculiarity in one of those functions that would have consequences in my coding.
kevin have my kids
What can I say! 😳
hi. Can you help me to understand how to use NumberFormatInfo to replace "." with "," tha is in a variable? Fo example
Dim a As String : a = "25.3"
Dim b As Decimal
b = CDec(a)
MsgBox(b)
I'll get a mistake. Because the separator of my system is "," Thank you