Mad Lib Indents?

csp-unit-5
#1

Hi there,
I hope this doesn’t seem silly, but how in the world do you create line breaks like the code shown.
I tried a return (enter) and a soft-return, but I get a red error.

When concatenating a really long string, it just goes off forever to the right!
I am in Unit 5 - Lesson 6 Mad Lib (sadly).
My students and I could not keep up with the rigorous pacing guide.!
They are still in app lab.

mad_lib_code|598x500Working link

#2

I’m not sure that this is actually what you are asking, but the code looks to me like it should run. If you are asking where to find “\n” , to my knowledge there isn’t a block, but it is typed. For me, the slash is above the “enter” button on my keyboard (the same button as “|” for “or” logic).

Hope that helps! As far as pacing, is it possible to have a “super fun coding sleepover field trip :laughing::laughing::laughing:”? I’ve debated this as a way to get my kids some additional focused practice and get through a few concepts in one go.

#3

I’m not sure this solves your problem, but when completing this lesson I have several students use the wrong design element for the mad lib. They should use a text area and not a text input. A text input will cause the message to run off the screen no matter how many \n commands are included in the code.

#4

You are going to laugh!
I found that adding the " in the right place and the + in the correct place and tabbing over to indent was the answer.
Looked at the key for the Mad Lib project- and noticed the pattern.
What threw me off was the red block I saw when I hit return/enter. (I am on i macs). I know I have to get out of block view and into text view at this stage of the game.
I did (based on your advice) line up two Saturday sessions.
I have two types of students
A. They just want to learn something about CS, don’t care about passing the AP assessments
B. Students do want pass and could with more time, pass the AP assessments.

First year of CS at our school. Tough as I am a computer scientist in training.

2 Likes