top of page

Feeling cold? Snuggle up with your laptop and a chai tea latte for another programming challenge.

Writer: Amulya Malapaka
Amulya Malapaka
Oct 14, 2018
1 min read

Let's do another problem today. Let's work with some boolean logic! Today, let us write some code that switches the value of a variable based on the state of the boolean. Here's some psuedocode.


//Create a string

//Create a boolean


//if(boolean)

// set string to "true"

//else

// set string to "false".

If you need some boolean review, run through these tutorials :)

https://www.khanacademy.org/computing/computer-programming/programming/logic-if-statements/pt/booleans


To go with this fun task, here's a recipe for some easy chai tea latte!


https://www.ohmy-creative.com/kitchen/chai-tea-latte/#_a5y_p=5173215


Signing off!


Amulya Malapaka


 
 
 

Recent Posts

See All
Well it's been a while, huh.

Welcome back girls and boys, we're in for a fun ride :) As the end of the school year approaches us I'm sure we're excited for a summer...

 
 
 
THANKSGIVING!

IT'S THANKSGIVING!!! Want to know what I'm thankful for? I'm thankful for the beautiful weather we've been having.(Yes that was...

 
 
 

7 Comments


anikaveda1
Oct 22, 2018

C++

{

bool hello;

if (bool)

{

hello = true;

}

else

{

hello = false;

}

return 0;

}

Like

Manasi Mangalvedhe
Manasi Mangalvedhe
Oct 22, 2018

String name = "Unicorn";

boolean isSparkely;

if(name.equals("Unicorn"))

isSparkely = true;

else

isSparkely = false;

Like

Yiyuan Sun
Yiyuan Sun
Oct 15, 2018

@ Manasi


//cough cough cough

name.replace("Freshman", "Seniors");


Like

Manasi Mangalvedhe
Manasi Mangalvedhe
Oct 15, 2018

Java:


String name = "Freshman";

boolean isStressed;

if(name.equal("Freshman"))

isStressed = true;

else

isStressed = False;

Like

Ishika Awachat
Ishika Awachat
Oct 15, 2018

String person = "highSchooler";

boolean isTired;

if(person.equals("highSchooler"))

{

isTired = true;

}

else

{

isTired = false;

// probably still true though

}

Like
bottom of page