Recap - Initialize Variables
Part of the Fundamentals section of Coddy's Python journey — lesson 9 of 77.
Challenge
BeginnerWrite code that initializes the following variables:
kwith the value88(note: lowercase 'k')PIwith the value3.14(note: uppercase 'PI')namewith the value“Bob”.
Make sure you use the exact variable names and values. Remember:
- Python is case sensitive! (
k≠K)- String values must be enclosed in quotes:
"bob"notbob
Try it yourself
# Type your code below
# Don't change the line below
print(f"k = {k}")
print(f"PI = {PI}")
print(f"name = {name}")All lessons in Fundamentals
4Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Logical Operators Part 48Loops
For LoopWhile LoopBreakContinueRecap - FactorialThe Range FunctionNested LoopRecap - Dynamic Input3Operators Part 1
Arithmetic OperatorsModulo OperatorArithmetic ShortcutsRecap - Simple MathComparison Operators9Functions
Declare a FunctionArgumentsReturnRecap - Sigma FunctionRecap - Validation FunctionDefault Values12Iterating Over Sequences
Iterating Over ElementsThe Enumerate FunctionIterating Over Strings Part 1Iterating Over Strings Part 2