Name an ethical hacker
Convert 10 into binary
Convert 101 into binary
What will the following code display?
user = xXedgelord420Xx
print ("Hello", user)
What will the following code display?
user = xXegrill69Xx
print ("Hello, user")
What is a variable?
What is the convention for naming variables?
How do you declare if a variable is a string or an integer?
What is initialisation of a variable?
Take a look at the code below. Predict what might happen?
Using Trinket below, recreate and run the code. Did anything unexpected happen? Write down your thoughts.
In which line is the variable adjective initialised?
In which line is the variable adverb first reassigned?
When is the variable noun first used?
Is there a difference between the code in line 4 and line 8?
On line 4, remove the f after print and before the speech mark. Run the code and write down what happens.
! Remember to place the f back in when you have finished.
What do you think the f is used for? (google python-f-strings for help)
On line 4, remove the curly {} brackets that surround noun and run the code again. What happens?
! Remember to place the {} back in when you have finished.
Why does it not display "The Car Zebra was loud giant when it gently aggressively went to school when the code is executed?"
Modify your code with the following questions:
1. Change all values in both occurrences of noun, adjective, and adverb to something different.
2.Create a new variable called proper_noun and initialise it as London.
3. Replace the word school with {proper_noun} in both print statements.
4. Make a change to your code that will ensure that the second print statement displays a different proper noun.
5.Add a completely new silly sentence to the bottom of the code. You can use the same variables but think of a different sentence to write.
Add your edited code