Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
Last active February 6, 2023 13:44
Show Gist options
  • Select an option

  • Save udacityandroid/5b1b7da3e1cba07cda69 to your computer and use it in GitHub Desktop.

Select an option

Save udacityandroid/5b1b7da3e1cba07cda69 to your computer and use it in GitHub Desktop.
Android for Beginners : If/Else Weather Sample Quiz
boolean isRaining = true;
if (isRaining) {
Log.v("WeatherActivity", "It's raining, better bring an umbrella.");
} else {
Log.v("WeatherActivity", "It's unlikely to rain.");
}
Log.v("WeatherActivity", "Thank you for using the WhetherWeather App.");
@ZerocoolVishal

ZerocoolVishal commented Dec 9, 2016

Copy link
Copy Markdown

WeatherActivity It's raining, better bring an umbrella.

@habiballahafg

Copy link
Copy Markdown

In the tutorial when I checked the answer shows that isRaining is false but here it's true. ⭕

@Drast10

Drast10 commented Dec 12, 2017

Copy link
Copy Markdown

WeatherActivity, It's raining, better bring an umbrella.
WeatherActivity,Thank you for using the WhetherWeather App.

@yoginicoder

Copy link
Copy Markdown

In the tutorial the answer shows that isRaining is false! :( Not right...

@lkings40

lkings40 commented Feb 4, 2018

Copy link
Copy Markdown

WeatherActivity, It's raining, better bring an umbrella.
WeatherActivity,Thank you for using the WhetherWeather App.

ghost commented Feb 4, 2018

Copy link
Copy Markdown

WeatherActivity,It's raining, better bring an umbrella.
WeatherActivity,Thank you for using the WhetherWeather App.

ghost commented Feb 4, 2018

Copy link
Copy Markdown

This code is different from code in answer video!

@Nogaeman

Copy link
Copy Markdown

It's raining, better bring an umbrella.
Thank you for using the WhetherWeather App.

@abdahma01

Copy link
Copy Markdown

It's raining, better bring an umbrella.
Thank you for using the WhetherWeather App.

@MasterSami1985

MasterSami1985 commented Mar 7, 2018

Copy link
Copy Markdown

its C

@badrddinb

Copy link
Copy Markdown

Thanks

@pinedalezephyr

Copy link
Copy Markdown

Sadly I have run into this in several of the classes and lessons I have finished. The answers do not match the correct answer. I have even seen where the answer video is incorrect. When stuck here just do your best and move on. Just the other day the answer video had the wrong variable name and code crashed. So just keep working through and most important have fun!

@ahmedmofreh

Copy link
Copy Markdown

It's raining, better bring an umbrella.
Thank you for using the WhetherWeather App.

@avsingh999

Copy link
Copy Markdown

Please change this code like video

@Gaganindoriya

Copy link
Copy Markdown

It's raining, better bring an umbrella
Thank you for using the WhetherWeather App.

@hephyang1

Copy link
Copy Markdown

If statement is set to true here, and the possible answer to the quiz is indicating that it was set to false

@orwa-te

orwa-te commented Jun 26, 2018

Copy link
Copy Markdown

There is a problem in this quiz:
The "isRaining " value in the code is true but in the video is false???!!!
Also the order of message in the video is not the same in the code above

@emanhamad

Copy link
Copy Markdown

C

@ime01

ime01 commented Nov 7, 2018

Copy link
Copy Markdown

It's raining is true, hence the message "better bring an umbrella" is displayed alongside the "Thank you for using the WhetherWeather App." because that occurs outside the conditional statement

@mixspark

Copy link
Copy Markdown

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment