---
# System prepended metadata

title: Lab 1 Suggestions

---

# Lab 1 Suggestions

## Returning values

For lab 2 [found here](https://github.com/Seasons-of-Rust/SoR-Lab-2), students write code that explores function, control flow, and conditional statements. You can see a completed version of the lab [here](https://github.com/Seasons-of-Rust/sor-lab-2-SpiderQueen8/pull/1/files).

This file covers some comments that you can make on student's code to help improve it. You can find all of the 

### Code

```rust
return (carrots + nuts) * (carrots + nuts + seeds);
```

### Forest's template

Remember, we don't need to add the return keyword, since it's implicitly added at the end of functions :)

Instead, your code can look like:

```rust
(carrots + nuts) * (carrots + nuts + seeds)
```

## Dividing values

### Code

```rust
rabbits = rabbits/2;
```

### Forest's template

One thing I saw from some other students (that I didn't think to do myself) was to do `rabbits /= 2;` on this line. Kind of neat!