I'm stuck on the second task. How should I write the body for the function remaining_oven_time?
https://exercism.org/tracks/lua/exercises/lasagna/edit
#[Lua] Lasagna
47 messages · Page 1 of 1 (latest)
please use codeblock instead of screenshot. codeblock is easier to copy/paste/edit and easier to read
you can wrap your code with 3 backticks ` at the beginning and the end
def func():
print("Hello, World")
also did you check the hints section yet for that task?
Calculate the remaining oven time in minutes
You need to write the body for the function remaining_oven_time.
You need to return a number.
You can use the arithmetic operator for substraction.
yes, but i still don't understand what should i do...
What is task number 1 about?
Define the lasagna.oven_time table field with how many minutes the lasagna should be in the oven
Do you understand what it mean?
yes
oh, you are about this : You need to write the body for the function remaining_oven_time. ?
I needed to add oven_time to the array
Yeah but you need to understand what is the task is telling you in plain english
Task 1 telling you that a lasagna is expected to take 40 mins to cooked, yeah?
ok, then what is task 2 asking you to do?
forget the code part, just focus on the instruction in term of normal english
count how much time remaining stand in the oven
right. correct
and how would you do it in real life?
if it take 60 mins to cook a chicken in an oven, and now 45 mins has passed. how do you figure how many more minutes are left?
I'll subtract How much time has passed from The time that lasagna should stand in the oven
there you go
60-45
but how should i write it in code?
you take one and minus the other, just like you do normal math
but with variable names instead
like that? lasagna.oven_time - actual_minutes_in_oven
why not give it a try
Okay, i was a litle stupid, but thank's bro)
np
if you are totally new to programming, consider
Hello! We are happy to have you here. Exercism is best suited for people who have some experience in programming. If you are completely new to the topic, exercism might be very challenging. There are many great resources online, that can kickstart your journey in computer science. For a wide understanding, you can try the free CS50x course at Harvard: http://cs50.harvard.edu/x/2024/. If you want to focus on web development you can also try The Odin Projects (free and open source: http://theodinproject.com/). It is a long-term commitment, that will guide you to master some projects and will prepare you to show off a nice portfolio in the end. Another interesting resource for web development are the MDN web docs: http://developer.mozilla.org/en-US/docs/Learn
Harvard University's introduction to the intellectual enterprises of computer science and the art of programming.
MDN Web Docs
Welcome to the MDN learning area. This set of articles aims to provide complete beginners to web development with fundamental skills for coding websites. The aim is not to take you from "beginner" to "expert" but to take you from "beginner" to "comfortable." From there, you should be able to start making your way, learning from the rest of MDN, ...
we dont really teach the very basics here. some tracks have a syllabus that can help with that, but not all does, and lua doesn't really have one for beginners
okay... than maybe i should choose another language?
if you are completely new, that course is very recommended
but if you want, you can totally pick a more popular track with more developed syllabus, like python
Lua is a tough language to start with because it's not really verbose abstracting the 'human readability' a bit from other more verbose languages. Or so some feel this way. I wouldn't recommend STARTING to learn on Lua, no. I'd probably do Python/Java/C# or MAYBE Go to start, but Go brings up pointers quicker than others and memory management is something that comes after you can confidently work your way through most of the exercises on a track. Or at least on the front half of the larger tracks. (the ones with the learn as you go modules)
it really depend on what you want to do. given your age and how you pick lua, i bet that this is roblox involved
One of my acquaintances recommended it to me
than i think i'll try this course and after that will think about lua
yeah but what was the question that lead to that recommendation?
go try the first 2 or 3 exercises of any of the above mentioned languages and see how they feel. I think you'll find their syntax a little easier to soak in.
I want to learn programming to work in this field in the future
okay, i'll try
yeah and then do that bigjay said, also def check out the cs50 course
lua is not good for beginners
and don't be discouraged. Learning a second speaking language and a new programming at the same time is not an easy task. That's a LOT of brain translating going on when you're trying to solve a problem!
cs50 Brown course is awesome, and free.
okay, thank's for helping again guys)