generated from mwc/lab_iteration
Nah
i understand all the ranges chances are i wont need people reading my program but if they do ill be there guideing them
This commit is contained in:
@@ -9,15 +9,18 @@ def print_all_numbers(maximum):
|
||||
|
||||
def print_even_numbers(maximum):
|
||||
"Prints all even integers from 0 to maximum."
|
||||
pass
|
||||
for number in range(0, maximum, 2):
|
||||
print(number)
|
||||
|
||||
def print_odd_numbers(maximum):
|
||||
"Prints all odd integers from 0 to maximum."
|
||||
pass
|
||||
for number in range(1, maximum, 2):
|
||||
print(number)
|
||||
|
||||
def print_multiples_of_five(maximum):
|
||||
"Prints all integers which are multiples of five from 0 to maximum."
|
||||
pass
|
||||
for number in range(0, maximum, 5):
|
||||
print(number)
|
||||
|
||||
chosen_maximum = int(input("Choose a number: "))
|
||||
print(f"All numbers from 0 to {chosen_maximum}")
|
||||
|
||||
@@ -8,5 +8,4 @@ def square(side_length):
|
||||
sizes = [20, 40, 60, 80, 100]
|
||||
for size in sizes:
|
||||
square(size)
|
||||
input()
|
||||
|
||||
input()
|
||||
6
squares.py
Normal file
6
squares.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from turtle import square
|
||||
square(20)
|
||||
penup()
|
||||
forward(40)
|
||||
pendown()
|
||||
square (20)
|
||||
Reference in New Issue
Block a user