Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pierian-data

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: pierian-data/complete-python-3-bootcamp
Path: blob/master/02-Python Statements/07-Statements Assessment Test.ipynb
Views: 648
Kernel: Python 3


Content Copyright by Pierian Data

Statements Assessment Test

Let's test your knowledge!


Use for, .split(), and if to create a Statement that will print out words that start with 's':

st = 'Print only the words that start with s in this sentence'
#Code here

Use range() to print all the even numbers from 0 to 10.

#Code Here

Use a List Comprehension to create a list of all numbers between 1 and 50 that are divisible by 3.

#Code in this cell []

Go through the string below and if the length of a word is even print "even!"

st = 'Print every word in this sentence that has an even number of letters'
#Code in this cell

Write a program that prints the integers from 1 to 100. But for multiples of three print "Fizz" instead of the number, and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".

#Code in this cell

Use List Comprehension to create a list of the first letters of every word in the string below:

st = 'Create a list of the first letters of every word in this string'
#Code in this cell

Great Job!