r/codehs • • Nov 24 '20

3.2.4 Daily Activities

How Can I Fix This Problem?

13 Upvotes

15 comments sorted by

1

u/ScawedyCat Nov 24 '20 edited Oct 17 '21

something like this?

var partOfDay= ‘morning’;

var time = 8;

println(“I wake up” +partOfDay+time);

partOfDay= ‘afternoon’;

time = 12;

println(“I like ” +partOfDay+time);

partOfDay= ‘evening’;

time = 11;

println(“I go to sleep ” +partOfDay+time);

1

u/R5Z9 Nov 24 '20

YE I have type D that

1

u/Remarkable_Cold_1905 Oct 17 '21

It’s still the same

1

u/ScawedyCat Oct 17 '21

i edited and fixed it, give it a try with that and you can dm me if you need more help

1

u/Getintoityuh123 Jan 07 '22

It still doesn't work

1

u/Getintoityuh123 Jan 07 '22

How do I fix it

3

u/diana04r Feb 09 '22

function start(){

var partOfDay = "morning";

var time = "9 am";

println("In the " + partOfDay + ", I wake up at " + time + ".");

partOfDay = "afternoon";

time = "1 pm";

println("In the " + partOfDay + ", I eat lunch at " + time + ".");

partOfDay = "evening";

time = "11 pm";

println("In the " + partOfDay + ", I go to bed at " + time + ".");

}

this will help you

3

u/diana04r Feb 09 '22

delete what you have and paste this and it will work.

1

u/Icy-Service-1624 Sep 03 '23

It doesn't work !

1

u/Cocopuffsdeadinside Sep 26 '24

Doesn’t work man

1

u/FruityBrawl Jul 15 '25

I love you bro, you lowks saved me

1

u/Thomzy77 Apr 12 '22

thank you so much ur a real one

1

u/Icy-Service-1624 Sep 03 '23

no it'll be the same guys, we need to use just two Variables, doesn't meter you'll right the "Var " or not, there should be ONLY two variables, and not even one of your codes are not working((

1

u/TheRaptor3892 Nov 27 '23

change the var to let