Showing posts with label visual studio. Show all posts
Showing posts with label visual studio. Show all posts

Saturday, June 05, 2021

Nintendo Switch lite - SmileBASIC4 - Coding Console Calculator


Nintendo Switch Lite - Blue

Hey guys,

Check it out!

One of the things I like about my Nintendo Switch lite is that I'm not just using it for gaming. I like watching videos on Youtube and also listening to music. No Netflix? No Spotify? Well, you just need youtube. Once awhile, I'll post pics and short clips videos on Facebook or Twitter.

Another thing I like is the software SmileBASIC4 and FUZE4. Although, I mostly spend my time with SmileBASIC more. You can learn to code games and play them on your own Switch. What I really like about SmileBASIC is that it's not just for games. The language is pretty much similar to BASIC and Python.



Nintendo Switch Lite - Blue

I'm more into Python because of Raspberry pi. I had always wanted to learn to code but didn't get the chance when I was in school. I only saw that you can create your own smart car robot with Raspberry Pi and Arduino that I was interested in. That's where I started to learn to code with Python.

The kids nowadays got the chance to learn about programming with Microbit. I actually got it for myself too. Playing with them is really fun. And, of course, it's more fun learning to program with 'toys' like this. Where you can literally see things work.



Adeept BBC Micro:bit Sensor Starter Kit | Microbit Programmable Starter Kit for Micro:bit with 35 Projects PDF Tutorial Book | Micro:bit and Expansion Board Included

Anyway, I played with Microsoft Visual studio and followed a tutorial to create a console calculator with C++. There's also a tutorial for C#. Instead of following the tutorial, I was wondering if I could take some of the code and create a console calculator on my Switch lite with SmileBASIC4.

I thought the core of the code in C# which is the calculation is pretty simple enough to redo with SmileBASIC. This is the part where knowing Python actually helps me. The fact that SmileBASIC is similar(almost) to BASIC and Python makes it much easier.



Learn C++ Quickly: A Complete Beginner’s Guide to Learning C++, Even If You’re New to Programming (Crash Course With Hands-On Project)

I was actually stuck with the INPUT problem in SmileBASIC 4. In python, I could easily let a user input to choose an option and then Print whatever I want. It keeps coming out with all the answers for plus, minus, multiplication, and divide.

I thought to just let it be. I don't think there's any calculator in the world that gives out an answer all at once. Lol. In the end, I decided to ask @notohoho, the CEO of Smileboom on Twitter. He was kind enough to answer my question the last time. Thankfully, he was also keen to help me this time around too.


I was stuck trying to print the option of the user with the INPUT command.


Probably, one of the @notohoho students or SmileBASIC users gave me a solution of using the command OPTION aka opt$.


While @notohoho gave me this solution of using the command INSTR(OPT$,"").

I tried both of the solutions and it didn't work at first. It was only when I realized that I had put the endif at the wrong place. You can see the pics of my earlier code where I've placed all the endif at the bottom, instead of after every if. That's basically how I learn, from trial and error.


I decided to add an option "x" where the user can get all the calculation answers at once. Kinda cool!

       

The second part of the final code. Of course, you can copy these. Add anything you want to it. I was even thinking of adding background music. I can even upload it to the SmileBASIC server but I'm lazy. There are others that already upload better calculator apps.

You can watch the video and see how it works here



Nintendo Switch with Neon Blue and Neon Red Joy‑Con - HAC-001(-01)

If you had gone to visit the C# tutorial page, you'll see that the console calculator looks similar to the one I created using SmileBASIC 4. There's actually more to the C# tutorial and personally, the code is more 'cumbersome' to me. While with SmileBASIC4, it looks much simpler.

That's part of another reason why I like SmileBASIC. It's simplicity. I guess it's meant to be easy. For learning purposes. For a newbie like me? Also, with the Nintendo Switch, its portability meant, you can bring it and code anywhere. I actually code this calculator while in bed using the on-screen keyboard.

I'm self-learning coding just for fun and basic knowledge. Like I've said, I've been wanting to learn to code since I was a child. The kids nowadays are so fortunate that there are many programs suited for their age to learn. The good thing is that because of the Internet, it's much easier to research and learn online.

If you're interested, come join the fun!

What you guys think?

Help support this blog and youtube channel. Buy me Coffee @

https://www.buymeacoffee.com/W04oadL

*Shop the latest deals from Amazon via our links to support us. Tq!

Subscribe to our blog and youtube channel for the latest post and video upload!

Happy coding!


P.S. Nintendo Switch Lite - Blue




Saturday, May 29, 2021

Nintendo Switch lite - How similar is SmileBASIC4 to Python?


Nintendo Switch Lite - Blue

Hey guys,

Check it out!

I like dabbling with Python since the day, I bought myself a Raspberry pi 3. I was interested in building my own smart car robot and they use python to control it. The good thing is that there are many tutorials online that you can easily follow.

Frankly, I had always wanted to learn to code but didn't get the chance to. When I first heard of the Raspberry pi, I didn't really think much about it. But when I saw that you can create your own smart robot, I decided to get one. That's how I discovered Python and found out how easy it is to learn.



Nintendo Switch Lite - Blue

One of the problems for me is that I don't have the discipline to keep learning. It's not as if I have to take a test for it. But, I like to try out new things and see if I can make them work. It's that eureka feeling that got me excited.

My favorite portable gaming console is the Nintendo Switch lite. When I discovered that I can learn to code and create my own games with SmileBASIC4 and FUZE4, I was really excited and bought both of them. I got more excited when I discovered that smilebasic and python are so much alike.



Oussirro HDMI USB C Hub Adapter for Nintendo Switch, 1080P Type C to HDMI Converter Dock Cable for Nintendo Switch



Gaming Keyboard and Mouse and Mouse pad and Gaming Headset, Wired LED RGB Backlight Bundle for PC Gamers and Xbox and PS4 Users - 4 in 1 Edition Hornet RX-250

If you have the Nintendo Switch, you can link to your TV for a bigger screen. It'll be much better for a full coding setup. You can't do that with the Switch lite. So, most of the time, I just try out code on my bed before going to sleep. But, I can still use a mouse and keyboard if I want to.

You can actually game with a mouse and keyboard on the Nintendo Switch but you need a console adapter. With that adapter, you can connect a mouse and keyboard and play like on a computer. This is the same kind of adapter that's also compatible with your Xbox and PS4.



Mario Kart Live: Home Circuit -Luigi Set - Nintendo Switch Luigi Set Edition

I wonder if someone in Nintendo had actually read my blog. Because I have talked about using my Nintendo Switch to control my raspberry pi 3 smart car before. And, now, they've come out with this? I'm also hoping that there will be a Mario Drone or something like that. You hear it here first!

Now, that will be really cool. Playing Mario or Luigi or Princess drone racing. Would be fun to be able to take videos while you're flying. Of course, you need a good camera, which the Switch doesn't have. I don't know why there is a camera on the 3DS but no camera on the switch?



Coding Games in Python (Computer Coding for Kids)

I actually didn't know or did I? That smilebasic for the 3DS was already available back then. I was wondering if the software is available so that I can use it on my phone with an emulator. Lo and behold! Now, I can use smilebasic 3ds on my phone. Check out my video demo here.

What I like about python is that you can use it practically anywhere. I have a version of it on my phone so that, I can try code whenever I've got an idea. Or if I've learned something new and want to try it out. That's what so great about the smartphone today. It's a powerful mini-computer inside your pocket!



Samsung Electronics Galaxy Z Fold 2 5G | Factory Unlocked Android Cell Phone | 256GB Storage | US Version Smartphone Tablet | 2-in-1 Refined Design, Flex Mode | Mystic Black (SM-F916UZKAXAA)

That's why, if I have the money and it's becoming cheaper, I want to get the Samsung Z Fold 2 or future Z Fold 3? I want to open it up halfway and use it as a laptop. Open it up fully and you can use it as a tablet. This is pretty much the future of mobile phone laptops.

What more do you need when you can practically do everything with a mobile phone? You can play games, check emails, social media, take pictures or videos, edit them and upload them on youtube to share with the world or just with your colleagues.

I want Samsung or Microsoft to expand on this idea and create the perfect blend of mobile phone laptops. They need to improve and think of new innovations for a mobile phone that can be close and use as a phone or open up and use as a laptop or tablet.

Once they have that, it'll be way cool to use Visual Studio, the Android version.

What you guys think?

Help support this blog and youtube channel. Buy me Coffee @

https://www.buymeacoffee.com/W04oadL

*Shop the latest deals on Amazon via our links to support us. Tq!

Subscribe to our blog and youtube channel for the latest post and video upload!

Happy coding!


P.S. Coding Games in Python (Computer Coding for Kids)