#[Lua] Lasagna

47 messages · Page 1 of 1 (latest)

novel burrow
acoustic quartz
#

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.
novel burrow
#

yes, but i still don't understand what should i do...

acoustic quartz
#

What is task number 1 about?

novel burrow
#

Define the lasagna.oven_time table field with how many minutes the lasagna should be in the oven

acoustic quartz
#

Do you understand what it mean?

novel burrow
#

yes

#

oh, you are about this : You need to write the body for the function remaining_oven_time. ?

acoustic quartz
#

No, im asking about task number 1

#

what does it mean

novel burrow
#

I needed to add oven_time to the array

acoustic quartz
#

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?

novel burrow
#

yea

#

I understood that

acoustic quartz
#

ok, then what is task 2 asking you to do?

#

forget the code part, just focus on the instruction in term of normal english

novel burrow
#

count how much time remaining stand in the oven

acoustic quartz
#

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?

novel burrow
#

I'll subtract How much time has passed from The time that lasagna should stand in the oven

acoustic quartz
#

there you go

novel burrow
#

but how should i write it in code?

acoustic quartz
#

you take one and minus the other, just like you do normal math

#

but with variable names instead

novel burrow
#

like that? lasagna.oven_time - actual_minutes_in_oven

acoustic quartz
#

why not give it a try

novel burrow
#

Okay, i was a litle stupid, but thank's bro)

acoustic quartz
#

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

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

novel burrow
#

okay... than maybe i should choose another language?

acoustic quartz
#

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

scarlet sorrel
#

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)

acoustic quartz
#

it really depend on what you want to do. given your age and how you pick lua, i bet that this is roblox involved

novel burrow
#

than i think i'll try this course and after that will think about lua

acoustic quartz
#

yeah but what was the question that lead to that recommendation?

scarlet sorrel
#

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.

novel burrow
acoustic quartz
#

yeah and then do that bigjay said, also def check out the cs50 course

#

lua is not good for beginners

scarlet sorrel
#

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.

novel burrow
#

okay, thank's for helping again guys)