Small Basic - April Challenges! (no fooling)
A brand new set of challenges from litdev...
These challenges are intended for people who are learning to program for the first time or for those returning to programming who want to start using SmallBasic. Some will be easy, some will be hard - but they will all make you think, and more importantly be GREAT FUN!
Please post your solutions / partial solutions / questions / feedback etc. into this thread that will remain 'sticky' for the month. The only rule is that your solution must use standard SmallBasic methods (no extensions).
It would be good if people could post their problems with these challenges so that a discussion can start so that everyone can learn from each other.
Also post feedback on the kind of challenges that you want to see more of in the future.
Curriculum Challenges 3.4
- Use the Timer event to provide a countdown with the remaining time displayed in a GraphicsWindow.
- Use the Mouse events to draw rectangles on the GraphicsWindow, mouse down to start the top left and mouse up to finish with the bottom right corner.
- Use the key events to make a 'code typewriter' that displays a different letter to the one typed using a simple conversion like reversing alphabet a->z, b->y, c-> x etc.
- Use the button events to display 11 buttons (0-9 and .) laid out like a number keypad to enter numbers using the mouse.
Text Challenge
- Write a units converter program, where the user can select the units to convert and enter a value for conversion. Perhaps lengths, weights or currency.
Graphics Challenge
- Write a graphical 'dashboard' with buttons and textboxes as required to control a school bell timing system. The resulting system should then sound a bell at the required intervals that can be configured by the interface. The configuration(s) should be saved and loaded to a file.
Physics Challenge
- Write a program to calculate the distance traveled when the user enters an acceleration profile. For example:
2m/s/s for 5 sec, then 0m/s/s for 3 sec, then -4m/s/s for 1 sec
Answer 63m
Game Challenge
- Write a vertical scrolling game with obstacles that appear from above and move down. The player must dodge the obstacles by using arrow keys, probably just left and right.
Community Suggestions ( by Nonki )
Create a program to remove automatically added comments from downloaded Small Basic source program such as following manner.
Before:
' The following line could be harmful and has been automatically commented. ' _buf = File.ReadContents(filename)
After:
_buf = File.ReadContents(filename)
Make a chess clock.
Create a program to measure and calculate tempo [quarter note (crotchet)/minute] of Sound.PlayMusic(). In other words, count how many quarter notes (such as "C4") can be played in a minute.
Do you have an idea for a future challenge? Please post it here!
Thanks again to LitDev for hosting this challenge!
- Ninja Ed
Comments
Anonymous
April 02, 2014
Community Challenge 3: PMR444 smallbasic.com/programAnonymous
April 02, 2014
Oliver, good try.Anonymous
April 05, 2014
Oliver, thanks for joining in!Anonymous
April 14, 2014
I will try to write some of them :)Anonymous
April 14, 2014
Curriculum Challenges 3.4
- Import ID: GDF411
Anonymous
April 14, 2014
If it doesn't work then I will fix it but not now... it's late and I was programming for hours... :)Anonymous
April 14, 2014
(just testing something : ) /somethingAnonymous
April 14, 2014
Nah... anyway, if the upper program doesn't work then try this one ^_^ Import ID: KXD386Anonymous
April 14, 2014
Oh... and you have to import it in "Microsoft Small Basic", otherwise it wont work ; )Anonymous
April 14, 2014
Curriculum Challenges 3.4
- Import ID: ZZS949
- Anonymous
April 14, 2014
Curriculum Challenges 3.4
- Import ID: DNZ833 (Better import it in "Microsoft Small Basic" because pixels don't work in http://smallbasic.com/program)
Anonymous
April 15, 2014
smallbasic.com/programAnonymous
April 15, 2014
Curriculum Challenges 3.4 Number Keypad 1.1 smallbasic.com/programAnonymous
April 16, 2014
Graphics Challenge: NOTE: This program does not work on the internet. In order for it to work, you need to import it in "Microsoft Small Basic". Import ID: NBV238 ;)Anonymous
April 16, 2014
I FINALLY FOUND A SOLUTION!!! ^_^ Curriculum Challenges 3.4
- Import ID: BDR407
Anonymous
April 16, 2014
I made it better :D Import ID: PJV759Anonymous
April 17, 2014
Community Suggestions (by Nonki Takahashi) Chess Clock: Import ID: TLL449Anonymous
April 19, 2014
Game Challenge Import ID: KDQ877 I did it... I made my first game! ^_^Anonymous
April 19, 2014
Miskei, great job on the Number Pad! smallbasic.com/programAnonymous
April 19, 2014
Tom, I like this Rectangle one: smallbasic.com/.../program Great job!Anonymous
April 19, 2014
Tom, the Chess Clock is awesome! =^) smallbasic.com/.../programAnonymous
April 19, 2014
Tom, also great job on the dodging game: smallbasic.com/.../programAnonymous
April 19, 2014
Thank you sir! I also posted my solutions into the thread. ^_^Anonymous
April 28, 2014
Great. Thanks, Tom!