Unit 1: Python Basics - Review Assignment
1.Comment out one line from the following code so that print(c) prints 5.
2.What's a syntax error?
3.What's a variable?
4.What is coding?
5.What does syntax mean?
6.Write code to print the sum of two variables, a and b.
7.Fix the syntax error in the starting code.
8.What's the result of the following code:python<br>a_var = 10<br># a_var = 20<br>a_var += 1<br>print(a_var)<br>
9.What's the difference between Code A and Code B:Code A:python<br>a_var = 15 # this sets a_var to 15<br>Code B:python<br>a_var = 15 """this sets a_var to 15"""<br>
10.What does the following code print:python<br>x = 15<br>y = 10<br>z = 33<br>print(x)<br>print(y)<br>print(z)<br>
11.What's the BASH command to execute a Python program?
12.What are some advantages of Python?
13.What are two different ways you can increment a variable a by 2?
14.Who is the creator of Python?
15.What's the difference between Sublime Text and Microsoft Word?
16.How would you characterize the popularity of Python?
17.Describe line-by-line what the following code does:python<br>a = 1<br>b = 2<br>c = a+b<br># d = c*2<br>e = c*b<br>e -= a<br>
18.Write code to do as described in the comments.
Did you like this question?
Was this helpful?
You may exit out of this review and return later without penalty.