Just don’t make it angry
07 November 2022
I made a robot that can see using sound. #shorts
03 November 2022
Best night of his life
12 October 2022
What happens when robots die?
11 October 2022
Pomodoro robot! This is a work in progress but too cute not to share
30 September 2022
Build your own web server using a Raspberry Pi Pico W using Phew.
28 August 2022
Yukon & Omnibot 3000
Omnibot 3000
Pico W Toothbrush
Whats new in Python 3.13a
Maker Faire Rome 2023
WeatherBot
Data Manipulation with Pandas and Numpy
Computer Vision on Raspberry Pi with CVZone
Learn how to program SMARS with Arduino
Build a SMARS Robot in Fusion 360
Python for beginners
Create Databases with Python and SQLite3
KevsRobots Learning Platform
85% Percent Complete
By Kevin McAleer, 2 Minutes
In the past few lessons, we’ve learned about various aspects of Python programming. Now it’s time to put all those concepts together and build a simple Python application. This will provide you with hands-on experience and help cement your Python knowledge.
We will build a simple quiz application. The application will do the following:
class Question: def __init__(self, prompt, answer): self.prompt = prompt self.answer = answer question_prompts = [ "What color are apples?\n(a) Red/Green\n(b) Purple\n(c) Orange\n", "What color are Bananas?\n(a) Teal\n(b) Magenta\n(c) Yellow\n", "What color are strawberries?\n(a) Yellow\n(b) Red\n(c) Blue\n", ] questions = [ Question(question_prompts[0], "a"), Question(question_prompts[1], "c"), Question(question_prompts[2], "b"), ] def run_quiz(questions): score = 0 for question in questions: answer = input(question.prompt) if answer == question.answer: score += 1 print(f"You got {score}/{len(questions)} correct") run_quiz(questions)
In this lesson, you’ve put the Python concepts you’ve learned to use by building a simple quiz application. This kind of hands-on experience is crucial in building your confidence and abilities as a Python programmer. Keep building more projects to improve and to keep your Python skills sharp.
< Previous Next >