> Mini Project: Kelvin to Fahrenheit
Let's imagine that the weather reports says that the temperature today will be 301 Kelvin. How should you dress for the day? Let's create an app that lets us know the temperature in fahrenheit. To start, create a variable named kelvinTemp, and set it equal to 301. Write a comment above that explains this line of code.
Finding the temperature in Celsius is similar to Kelvin — the only difference is that Celsius is 273.15 degrees less than Kelvin.
Let's convert Kelvin to Celsius by subtracting 273.15 from the kelvinTemp variable. Store the result in another variable, named celsiusTemp.
Write a comment above that explains this line of code.
Fahrenheit = Celsius * (9/5) + 32
In the next step we will round the number saved to fahrenheitTemp. Write a comment above that explains this line of code.
Log to the console the value of fahrenheitTemp. In our next step we are going to see what we can do to make sure that our number is a whole number by rounding down. The value you logged to the console should begin with 82.13
As we have just seen, when you convert from Celsius to Fahrenheit, you often get a decimal number. Go ahead and delete the console log code from step 4.
Use the .floor() method from the Math library to round down the Fahrenheit temperature. Save the result to the fahrenheitTemp variable. Check out the documentation for Math.floor() here: http://bit.ly/javascript-math-floor. Because this is a new concept we haven't covered yet, you may want to watch the next video if you get stuck at this point. This will round your decimal down no matter what the value. Other methods from the Math library you might try out are .round() and ceil(). Write a comment above that explains this line of code.
//Temperature in kelvin stored in variable `kelvin`
var kevinTemp = 301;
//Temperature in celsius stored in variable `celsius` 섭씨
var celsiusTemp = kevinTemp - 273.15;
//convert celsius to fahrenheit stored in variable `fahrenheit` 화씨
var fahrenheitTemp = celsiusTemp * (9 / 5) + 32;
//round the value of fahrenheit down and assign to `fahrenheit`
fahrenheitTemp = Math.floor(fahrenheitTemp);
console.log(" The temperature is " + fahrenheitTemp + " degrees Fahrenheit ");
//Math.cell : 올림 / floor : 내림 / round : 반올림
> Mini Project: Cat Years
1. Begin by creating a variable named myAge, and set it equal to your age as a number. Write a comment that explains this line of code.
Next, create a variable named earlyYears and save the value 2 to it. Note, the value saved to this variable will change. Write a comment that explains this line of code.
Use the multiplication assignment operator *= to multiply the value saved to earlyYears by 25 and reassign it to earlyYears. This will account for the first two years of a cats life where they experience accelerated growth. Write a comment that explains this line of code.
Since we already accounted for the first two years, take the myAge variable, and subtract 2 from it. Set the result equal to a variable called laterYears. We'll be changing this value later. Write a comment that explains this line of code.
Multiply the laterYears variable by 4 to calculate the number of cat years accounted for by your later years. Use the multiplication assignment operator *= to multiply and assign in one step. Write a comment that explains this line of code.
If you'd like to check your work at this point, log to the console earlyYears and laterYears. Are the values what you expected?
Go ahead and delete the console logs from step 6. Add earlyYears and laterYears together, and store that in a variable named myAgeInCatYears.
Write a comment that explains this line of code.
Save the value of your name to the variable myName. Write your name as a string and store the result in a variable called myName. Write a comment that explains this line of code.
Write a console.log statement that displays your name and age in cat years. Use string concatenation to display the value in the following sentence:
My name is NAME. I am HUMAN AGE years old in human years which is CAT AGE years old in cat years.
Replace "NAME" with myName, "HUMANE AGE" with myAge, and "CAT AGE" with myAgeInCatYears in the sentence above.
// assign my age to the variable `myAge`
var myAge = 20;
// assign early years to the variable `earlyYears`
var earlyYears = 2;
//multiply `earlyYears` by `25` to account for early growth rate
earlyYears *= 25;
// substract `2` years from `myAge` and assign to
//`laterYears`to account for growth rate of a cat after the first two years
var laterYears = myAge - 2;
// multiplying laterYears value by `4` to total cat years
laterYears *= 4;
//add value of earlyYears + laterYears fot the total age and assignt to `myAgeInCatYears`
var myAgeInCatYears = earlyYears + laterYears ;
// assign name to the variable `myName`
var myName = 'Yoon';
console.log(" My name is " + myName + ". I am " + myAge + "years old in human years which is " + myAgeInCatYears + " years old in cat years.");
You are, without a doubt, my favorite author, io games. Every time I read one of your articles on the wordle website, you always surprise me with something new. Great efforts!! https://iogamesio.onl https://wordlewebsite.com
The information you shared is what I was looking for, thank you very much. https://driftboss.net https://smash-karts.com
There is a wealth of enjoyable games available on the internet. Every hour at work, I take a break to play https://bubble-shooter.co
Good topic; I do not know where you are obtaining your knowledge. I have a lot more information to absorb or comprehension to gain. I appreciate you taking the time to share this, as I was looking for this information for an assignment. https://cookie-clicker2.co
Very specific and detailed instructions for each step, thanks a lot, a useful lesson. https://iogamesio.org
I'm interested in this project. Shall we co-operate? We will achieve something special in the future. https://1001tips.co/ https://nytsudoku.co/
We tried to fulfil their requirements with tooth and nail and it's the conclusion that today we're at this stage. This month https://www.adelhiescort.com/location/goa-escorts.html are rejoicing our empire of four years successively so we have added several unrevealed services recently.
I like this post of yours, it's really helpful and helps me a lot. I hope more articles like this continue to be published. https://wordle-unlimited.co/
I couldn't figure out what time it was! Thank you for your contribution!
https://doodle-jump.io
With the right https://wordlegameorg.com/ tools, you can create simple and efficient Java Script applications that can do a lot of things.
SSYouTube.top is a free tool to download videos from YouTube and save it to your local computer. The videos can be converted to avi video format. https://ssyoutube.top/en
I'm quite impressed with your eggy car and ovo game website because it has a detailed guide to Java Script for beginners. https://ovo-game.com https://eggy-car.com
Thank you very much. This information is really useful for me and I want to tell you that the article is great https://blueygame.com
Finally, the whistling tea kettle is an incredibly stylish addition to any kitchen. There are so many different styles and designs to choose from, so you can find one that fits your taste and style.
https://justteakettle.com/best-tea-kettle-for-gas-stove/
Wordle NYTimes is a word guessing game created by Jonathan Feinberg, a software engineer based in New York. The game is available for free on the New York Times website, and it has become incredibly popular in a short amount of time.
https://wordlenytimes.net/
I have applied your sharing to my programming work and everything seems to be going very smoothly, fortunately I wordle reached this article. Every word expressed in this article is perfect and gives me a lot of important knowledge.
worlde was created by Jonathan Feinberg, a software engineer, in 2008 as a fun side project. It quickly gained popularity among language enthusiasts and has since become a staple for word lovers everywhere. With its simple yet engaging concept, Wordle has become a go-to tool for language analysis, content summarization, and creative expression.
https://worlde.info/
Through events, JavaScript may communicate with HTML elements. Events are things that happen in the browser, such clicking a button or loading a website. JavaScript can be used to react to these events and carry out particular tasks https://blossomwordgame.io/
I am learning js related content recently, your explanation of js is very useful to me.https://everythingreplica.com/product-category/replica-air-jordans/
I am learning js related content recently, your explanation of js is very useful to me.https://everythingreplica.com/product-category/replica-air-jordans/
Thank you very much for the Java script shared by the author, which is very helpful to me. I hope the author can share more knowledge of js in the future.https://chatgptproapi.com/login-chat-gpt/
One such captivating word puzzle that has taken the world by storm is New York Times Wordle. This simple yet addictive game has garnered a massive following, becoming a cultural sensation in recent times. Let's explore the intriguing world of NYT Wordle, from its origins and gameplay to tips for mastering this challenging puzzle.
You ought to be a guru at writing computer code. I appreciate you sharing. dinosaur game
This is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works. Gacha 2 https://www.gacha2.com/
This article you provided gave me a direction, thank you for sharing.https://sillytavern.pro/
Finally, the whistling tea kettle is an incredibly stylish addition to any kitchen.
rainbow obby
How fortunate I was to find this post to be quite beneficial! Many thanks for it. I'm eager for more of this kind of helpful knowledge! Try it with mine, please! Play game https://poppyplaytimechapter3.com online.
I’m excited to uncover this page. I need to to thank you for ones time for this particularly fantastic read!! I definitely really liked every part of it and i also have you saved to fav to look at new information in your site. repolagu https://www.repolagu.com/
Interesting post. I Have Been wondering about this issue, so thanks for posting. Pretty cool post.It ‘s really very nice and Useful post.Thanks 구글 광고 상위 https://asaseo.net/
All the contents you mentioned in post is too good and can be very useful. I will keep it in mind, thanks for sharing the information keep updating, looking forward for more posts.Thanks شيشه الكترونيه https://rawqan.com/
Very nice article. I enjoyed reading your post. very nice share. I want to twit this to my followers. Thanks !. UFABETเว็บแทงบอลไม่มีค่าแรกเข้า https://www.cgsi.net/ufabetเว็บแทงบอลไม่มีค่าแรกเข้า/
First You got a great blog .I will be interested in more similar topics. i see you got really very useful topics, i will be always checking your blog thanks. 에볼루션 https://evolutioncasino.site/
We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work live game casino malaysia https://www.7slotsplay.com/
It seems like your message got cut off. Could you please provide more details or clarify your request for flowers delivery? If you have a specific question or if there's anything specific you're looking for regarding flower delivery, feel free to provide more information so that I can assist you better. 토토사이트 추천 https://www.mbkdarmon.com/
Relive soccer's greatest moments with 축구중계. Affordable access, HD quality, and a passionate community make it the top choice for fans.https://bmtv24.com
Relive soccer's greatest moments with 축구중계. Affordable access, HD quality, and a passionate community make it the top choice for fans.https://kktv04.com
Thanks for the informative and helpful post, obviously in your blog everything is good..
نكهات مزاج https://mazaj-sa.com/
This is as shown by an overall perspective astounding substance! I have by a wide edge usually around regarded taking a gander at your fixations and have displayed at the genuine that you are ideal concerning wearisome them. You are striking. emperor33 https://128.199.133.4/
Perfect piece of work you have done, this website is really cool with superb information. food recipe dairy https://foodrecipediary.com/
Very informative post ! There is a lot of information here that can help any business get started with a successful social networking campaign ! مايلي فيب https://rawqan.com/br/bbwi94gBMgTc4Vslaz2H/مايلي
wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated. https://medeponim.ru/pag/promokod-1xbet-bonus.html
That is really nice to hear. thank you for the update and good luck. https://www.dnabet.ac/
The Baccarat excitement on 실시간 바카라 사이트 is unbeatable. I highly recommend it.https://www.jackpotct.com/ko/d/casino
Timely GPT simplifies the 임용 process for academies and kindergartens.http://timelygpt.com
Booking a massage through 오피가이드 is a breeze with their user-friendly platform.https://www.opga.online
Its as if you had a great grasp on the subject matter, but you forgot to include your readers. Perhaps you should think about this from more than one angle. Trendzguruji.Me Awareness https://apunkagames.today/trendzguruji-me-awareness/
Thanks to 펀초이스, I had an amazing time exploring Busan. The reviews were spot on and helped me find the best experiences!https://www.funcho.org
탑걸주소's personalized recommendations make it easy to discover new content tailored to my interests. Highly recommend!https://www.tpgs.info
제주비키니룸's extensive selection of wines and cocktails is impressive.https://www.jejuops.com/제주룸싸롱
The multicultural aspect of 제주출장마사지 adds an interesting dimension to the experience.https://www.jejuops.com/제주마사지
Had a fantastic time at 오피모아! The atmosphere was serene and the massage was top-notch.https://www.opmoa.org
Thanks to 오피뷰, booking massage appointments is a breeze. Convenient and reliable platform for spa enthusiasts.https://www.opviews.org
I appreciate how user-friendly the navigation is on this 오피가이드 platform.https://www.opsite.biz
달리머넷 empowers users to make informed choices about their massages.https://www.dalimern.com
부산달리기 is my go-to platform for discovering unique experiences in Busan. From off-the-beaten-path attractions to local favorites, it never disappoints.https://www.busandal.org
The culinary section of 오피가이드 sounds mouthwatering. Can't wait to explore!https://www.opga001.net
To think about received on the web log even so placing cure admittedly simply a minor small submits. Gratifying way of probable potential, Were book-marking at a time risk-free versions end soars jointly.
https://apunkagames.today/tt3979/
The scented candles at 오피의신 create the perfect ambiance for relaxation. It's such a calming environment.https://www.norados.com
Just shared my first recommendation on 즐달; excited to see others' reactions!https://www.kindal.org
부산비비기 provides accurate and up-to-date info for businesses in Busan.https://www.busanbi.com
This website and I conceive this internet site is really informative ! Keep on putting up! High Blood Pressure Ke Lakshan https://apunkagames.today/high-blood-pressure-ko-kaise-control-karen/
A Convertidor de YouTube MP3 gratis is an invaluable tool for music lovers and content enthusiasts alike. https://convertidorvideo.com/
With its blend of strategy and deduction, Wordle offers a refreshing change of pace from other puzzle games. https://wordlenytimes.net/
Excellent to be visiting your blog again, it has been months for me. Rightly, this article that I've been served for therefore long. I want this article to finish my assignment within the faculty, and it has the same topic together with your article. Thanks for the ton of valuable help, nice share What Does Urge Delivery Mean On SHEIN https://apunkagames.today/what-does-urge-delivery-mean-on-shein/
This is exactly evenly a good material that i extremely extremely enjoyed reading viewing. It's not regularly which i maintain opportunity to run a difficulty. uber premier seating capacity https://apunkagames.today/uber-premier-seating-capacity/
We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work Amitabh Bachchan Net Worth In Rupees https://apunkagames.today/amitabh-bachchan-biography-height-age-family-more/
Very nice blog and articles. I am realy very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post. 롤 배팅 https://profitableharm.com/
При регистрации на сайте 1xBet вы можете воспользоваться только одним промокодом, который является действительным. Используя этот промокод, вы получите бонус до 32500 рублей. Важно отметить, что все остальные промокоды не являются действительными и не предоставляют такого же бонуса.
1xbet промокод на фриспины https://zerkaloff.ru/img/pgs/promokod-1xbet_bonus.html
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. hodgdon h335 powder https://midway-tactical.com/product/hodgdon-h335/
Very informative post ! There is a lot of information here that can help any business get started with a successful social networking campaign !
1xbet promo code for registration https://skyros.com/lib/pgs/1xbet_promo_code-vip_welcome_bonus.html
This method is usually successfully definitely best option. Every single one connected with incredibly tiny features usually are supposed by using quite a few historical past ability. I might suggest the software program tremendously. promo code of 1xbet http://renctas.org.br/pag/1xbet_promo_code_registration_nigeria.html
I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post. как ввести промокод в 1хбет https://sputnikspb.com/catalog/pgs/?1xbet_promokod_pri_registracii_bonus.html
Very nice blog and articles. I am realy very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post. betwinner promo code no deposit http://www.simacek.com/redirbg/pages/betwinner_promo_code_india_3.html
Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. melbet промокод http://forsport.pro/content/pgs/melbet_promokod_24.html
I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.действующий промокод на 1хбет http://xenon-lampa.ru/content/pags/promokod-1xbet_bonus.html
Thanks for another informative website. Where else could I get that type of information written in such an ideal way? I have a project that I am just now working on, and I have been on the look out for such information. промокоды на 1хбет https://mbatur.ru/images/pages/promokod-1xbet-bonus.html
Your post has those facts which are not accessible from anywhere else. It’s my humble request to u please keep writing such remarkable articles promo code for melbet https://rennerusa.com/pages/melbet_promo_code_28.html
I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work. https://zerkaloff.ru/img/pgs/promokod-1xbet_bonus.html
I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon…
롤 베팅 https://profitableharm.com
Wordle's intuitive interface and addictive gameplay make it a hit among players of all ages. https://wordlenytimes.net/wordle-unlimited/
1win promo code "DOR777" gives you the right to participate in exclusive bonus 500% up to $1025, with an opportunity to win valuable gifts. If you aim at increasing your capital, don’t miss out on a chance to use profitable offers. Apply it upon register for better rewards in the future. It is one of our unique bonus codes that people can avail themselves of and get a welcome promotion. Some online casinos have a complicated procedure you have to complete to apply the coupon, but as you will see, 1win is different. 1win bonus code no deposit https://strivecreatives.com/1win-promo-code/
That is really nice to hear. thank you for the update and good luck. Lee & Associates https://www.lee-associates.net/
Regards for this post, I am a big fan of this website would like to go along updated. 롤토토 https://locutor.info/
I was unable to find the time of it! thank for sharing!