How to conduct a Z-test??

For example, you roll the dice 100 times and the average is 3.85.

If null hypothesis,H is μ=3.5 and significance level α=0.01 conduct the test.

How to do the test in R studio.

# How to conduct a Z-test

This looks like a homework problem but I'll send you a useful link which might help. You're also missing information about the standard deviation to be able to do your problem.

https://mgimond.github.io/Stats-in-R/z_t_tests.html

Reminder of homework policy: FAQ: Homework Policy