- 2

module quiz 2 pythyon

Fill in the blanks to declare a variable, add 5 to it and print its value. x = 4 x ..........= 5 print(............) help please ??????

9th Jul 2021, 9:38 PM
amine
amine - avatar
5 Answers
+ 2
Did you try 1st? What operator would you use to add two numbers together? How do you print a variable? I see you at least figured out the parentheses () for the print statement. You can go back and review the course to help yourself and then return to the question to try again.
9th Jul 2021, 9:45 PM
ChaoticDawg
ChaoticDawg - avatar
0
The question is asking what happens if you ADD 5 to x. So if you know how to add something to a variable and then print it you can answer this.
9th Jul 2021, 11:34 PM
BlueTiger435
BlueTiger435 - avatar
0
Start with „Python for beginners“
10th Jul 2021, 4:25 AM
Angela
Angela - avatar
0
The question is asking you to add 5 to the declared variable. In the first line of code (x = 4), the variable "x" is declared as the integer 4. In the second line of code (x __= 5), you need to fill in the blank with the other half of the missing integer. Half of the answer is already given for you (=). here you should put the "+" symbol because the question is asking you to add. This gives you (x += 5). In the final line of code, you simply need to print the variable. This would be print(x). In case the "+=" symbol confuses you, just remember this: x = 1 x += 1 is the exact same thing as x = 1 x = x + 1 Both of these would give you the same output of 2.
10th Jul 2021, 9:04 PM
Gabriel Rodriguez
Gabriel Rodriguez - avatar
- 3
x=4 x+=5 print(x)
10th Jul 2021, 1:36 AM
Abhishek Kumar
Abhishek Kumar - avatar