Closed Lee-Janggun closed 1 month ago
If the answer required to give several lines, how should I indent? When I should answer the code including, println!("Hello"); println!("World");
then should I submit println!("Hello"); println!("World");
or whether println!("Hello"); ____println!("World");
@mhchung04 Do the first, the second won't compile.
In google form, the answer should be as follows
println!("hello, world!");
I am confused about the submission format. For example, In the first question of Rehearsal part 2, What format should I submit it in google form?
let mut sum = 0;
for i in input {
sum += i;
}
sum
or
let mut sum = 0;
for i in input {
sum += i;
}
sum
sum
@mookyung-choi. They will both work, you don't need to care about indent or format (I'll update the issue to explicitly mention this).
For questions asking about runtime behaviors, is the runtime environment ideal? In other words, is the memory infinite?
Example:
This is a question from previous exam.
I think this code terminates for all a
, but it aborts with stack overflow for some inputs in my PC.
// Question: `foo` function terminates for all `a`.
fn foo(a: i32) -> i32 {
if a < 10 {
return a;
}
foo(a.wrapping_add(1))
}
@ICubE- For part 1, you can assume infinite heap space/stack space unless specified otherwise.
For part 2, since they are coding problems, you do need to care about it.
This is an additional announcement for the midterm. Please read it carefully, and make sure to ask any questions you have.
Charging Laptop
Exam Time & Structure
The exam will be from 1:00PM to 3:10PM, and will consist of three parts
Once we start intermission, you won't be able to go back to part 1.
Each part may start a bit late depending on how to exam goes (e.g., start on 1:05 PM for part 1, and 2:45 PM for part 2).
Network
We understand that the network at 1501 is not that stable. We will prepare additional routers for better network connection during the exam.Update: the CS administration team has enhanced the E3_1501 network. We will use that for the exam.
Short Answer Questions.
TL;DR
You must only submit the code for
todo!()
If
todo!()
replaced with your submission doesn't compile, you get 0 points.There will be hidden test cases
The short answer question will be of the following form:
In this question, your submitted answer to the Google Form should exactly the replacement for
todo!()
in the code snippet.For example, a correct submission only enters the code
input
:You don't need to care about indent or format. For example, the following submission with a lot of spaces in front will work.
Any submission that submits more codes will be marked incorrect.
For example, an incorrect submission submits the entire function
id_usize
.If there are more than one
todo!()
, submit the answer for eachtodo!()
separately.