Python programming is a general-purpose language that enables the programmer for web development, machine learning, operating systems, mobile application development and video games. In this quiz, you will get to test out how much you know about this language as well as how to write it. Do you think you know enough to answer all of them correctly? Do give it a try and get to find out!
Nothing. It will return an error.
Hello Hi, This is a number 6 8 12
HelloHi, This is a number6812
Nothing, it will return an error
Hello Hi, text box2 boxbox box
Hello This is a number Hi, 4 box2 boxbox boxbox-box
X = 5 if x < 10 print("hi")
X = 5 if x < 10: print("hi")
The variable name has been spelled wrong
Variable names should start with $
If statements end in a colon, not semicolon
Instructions underneath an if and an else should be indented by 4 spaces
Every line ends in a semicolon
Words that python should understand should be "surrounded by quotes".
You have to say what type of data something is when you declare a variable.
Else statements end in a semicolon, not a colon
Print() should always be written with brackets
You should use ==, not = to check if two things are equal
You should always include units when working with numbers in Python
Here's an interesting quiz for you.