Lab 4.3 Guess Who
Lab 4.3 Guess Who
Roll Call
1. Create
a
list
of
names
with
at
least
six
different
names.
Try
to
vary
the
names
as
much
as
you
can.
2. Write
a
SNAP
script
to
welcome
each
person
to
the
program
by
name,
one
at
a
time.
(For
example,
"Welcome,
John."
"Welcome,
Mary."
"Welcome,
Scott.")
Make
sure
not
to
modify
the
list
of
names
when
you
run
the
script—you'll
want
the
list
again
later.
Also
make
sure
your
script
still
works
even
if
the
list
of
names
changes.
3. Write
a
new
SNAP
script
that
welcomes
all
the
players
at
once.
So,
for
example
instead
of
saying
"Welcome,
John,"
"Welcome,
Mary,"
and"Welcome,
Scott."
separately,
you're
new
script
should
say
"Welcome
John,
Mary,
and
Scott."
Start
by
writing
a
script
that
can
say
all
the
names
on
one
line,
then
try
to
add
the
commas
and
"and".
Make
sure
your
script
works
correctly
no
matter
how
many
names
are
in
the
list.
4. BONUS:
Modify
your
code
so
that
instead
of
using
a
pre-‐determined
list
of
names,
the
user
can
enter
the
names
to
be
included
in
the
list
one
at
a
time.
You'll
need
to
decide
how
to
determine
when
the
user
has
entered
all
the
names.
Eric,
Michelle,
5
(optional)
Contain
the
letter
'e'
Caleb
This
work
is
licensed
under
a
Creative
Commons
Attribution-‐
NonCommercial-‐ShareAlike
4.0
International
License
Introduction
to
Computer
Science
This
work
is
licensed
under
a
Creative
Commons
Attribution-‐
NonCommercial-‐ShareAlike
4.0
International
License