-
Explain how modules help us write programs.
-
For each of the following snippets of Python code, give what would be executed if run. If the snippet will not run because of an error, explain the error.
-
print(7 // 2)
-
print(7 / 2)
-
print(7 % 2)
-
for i in range(-10, 10, 3): print(i, end=" ")
-
for i in range(0, 5): for j in range(i, 5): print(j, end=", ") print()
-
import turtle import math window = turtle.Screen() myrtle = turtle.Turtle() myrtle.forward(100) myrtle.right(90) myrtle.forward(100) myrtle.right(135) myrtle.forward(math.sqrt(2 * (100 ** 2))) window.exitonclick()
-
-
Write a python program that prompts the user to enter three integers via the command line. Your program should then print the average of the 3 integers the user typed in.
-
Write a python program that prints all multiples of 9 that are less than 1000.