Programming rock paper scissors part 1 TPE
star
star
star
star
star
Last updated over 3 years ago
26 questions
1
Name an ethical hacker
Name an ethical hacker
1
Convert 10 into binary
Convert 10 into binary
1
Convert 101 into binary
Convert 101 into binary
1
What will the following code display?user = xXedgelord420Xxprint ("Hello", user)
What will the following code display?
user = xXedgelord420Xx
print ("Hello", user)
1
What will the following code display?user = xXegrill69Xxprint ("Hello, user")
What will the following code display?
user = xXegrill69Xx
print ("Hello, user")
1
What is a variable?
What is a variable?
1
What is the convention for naming variables?
What is the convention for naming variables?
1
How do you declare if a variable is a string or an integer?
How do you declare if a variable is a string or an integer?
1
What is initialisation of a variable?
What is initialisation of a variable?
1
Take a look at the code below. Predict what might happen?
Take a look at the code below. Predict what might happen?
1
Using Trinket below, recreate and run the code. Did anything unexpected happen? Write down your thoughts.
Using Trinket below, recreate and run the code. Did anything unexpected happen? Write down your thoughts.
1
In which line is the variable adjective initialised?
In which line is the variable adjective initialised?
1
In which line is the variable adverb first reassigned?
In which line is the variable adverb first reassigned?
1
When is the variable noun first used?
When is the variable noun first used?
1
Is there a difference between the code in line 4 and line 8?
Is there a difference between the code in line 4 and line 8?
1
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.
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.
1
What do you think the f is used for? (google python-f-strings for help)
What do you think the f is used for? (google python-f-strings for help)
1
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.
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.
1
Why does it not display "The Car Zebra was loud giant when it gently aggressively went to school when the code is executed?"
Why does it not display "The Car Zebra was loud giant when it gently aggressively went to school when the code is executed?"
1
Add your edited code
Add your edited code
1
For each of these example programs, decide what will be displayed (output) based on the values that are inputted.
Input is Harry, Output is _______
Input is Shariff, Output is _______
Input is Evelyn, Output is _______
1
Input is 25, Output is _______
Input is 27, Output is _______
Input is 12, Output is _______
1
Input June Output _______
Input July Output _______
Input August Output _______
1
Input 6 Output _______
Input 10 Output _______
Input 7 Output _______
1
Input 7 Ouput _______
Input 9 Output _______
Input 3 Output _______
1
Input 67 Output _______
Input 24 Output _______
Input 93 Output _______