-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassignments-01.qmd
66 lines (43 loc) · 2.17 KB
/
assignments-01.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
title: "Module 1 Assignments"
---
```{r}
#| echo: false
#| message: false
#| warning: false
library(tidyverse)
library(readxl)
assignments <- read_excel("assessment_schedule.xlsx") %>%
mutate(formatted_date = format(due_date, "%A, %B %d, %Y"))
```
Programming Problems should be submitted to [gradescope](https://www.gradescope.com/courses/934148).
If you need instructions on how to submit your `.py` files to gradescope, watch the video at the end of this page.
# Programming Problem 1
**Due date: `r assignments %>% filter(assessment == "Module 1 Programming Problems") %>% pull(formatted_date)` at 9pm**
Write a python program that prints out the string "Hello World!". Be careful with capitalization and punctuation. Remember to write code inside a function called `main()`.
The exact output of the program should be:
```{=html}
<pre>
Hello World!
</pre>
```
Name the program `hello.py`. Make sure that gradescope gives you the points for passing the test case.
# Programming Problem 2
**Due date: `r assignments %>% filter(assessment == "Module 1 Programming Problems") %>% pull(formatted_date)` at 9pm**
Write a python program that prints out the following excerpt from Amanda Gorman's poem, "The Hill We Climb":
```{=html}
<pre>
When day comes, we ask ourselves, where can we find light in this never-ending shade?
The loss we carry. A sea we must wade.
We braved the belly of the beast.
We've learned that quiet isn't always peace,
and the norms and notions of what "just" is isn't always justice.
And yet the dawn is ours before we knew it.
Somehow we do it.
</pre>
```
Name the program `poem.py`. Remember to write code inside a function called `main()`. Make sure that gradescope gives you the points for passing the test case. You can submit your solution to gradescope as many times as you want before the deadline.
HINT: `print()` has a parameter called `end` which is set as `end="\n"` by default -- change that to `end=""` to remove the last newline character.
Make sure you [do the reading](basics.html) for this module, especially the section on [Escape Sequences](basics.html#escape-sequences)
# How to submit to gradescope video
{{< video https://youtu.be/ZxM2n2FLguI >}}