Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
Last active February 6, 2023 13:44
Show Gist options
  • Star 31 You must be signed in to star a gist
  • Fork 17 You must be signed in to fork a gist
  • Save udacityandroid/5b1b7da3e1cba07cda69 to your computer and use it in GitHub Desktop.
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
Copy link

ZerocoolVishal commented Dec 9, 2016

WeatherActivity It's raining, better bring an umbrella.

@habiballahafg
Copy link

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

@Drast10
Copy link

Drast10 commented Dec 12, 2017

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

@yoginicoder
Copy link

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

@lkings40
Copy link

lkings40 commented Feb 4, 2018

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

Copy link

ghost commented Feb 4, 2018

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

Copy link

ghost commented Feb 4, 2018

This code is different from code in answer video!

@Nogaeman
Copy link

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

@abdahma01
Copy link

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

@MasterSami1985
Copy link

MasterSami1985 commented Mar 7, 2018

its C

@badrddinb
Copy link

Thanks

@pinedalezephyr
Copy link

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

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

@avsingh999
Copy link

Please change this code like video

@Gaganindoriya
Copy link

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

@hephyang1
Copy link

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

@orwa-te
Copy link

orwa-te commented Jun 26, 2018

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

C

@ime01
Copy link

ime01 commented Nov 7, 2018

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

done

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