No. You will not write a line of code on the PSD I, because it is a multiple-choice assessment of 80 questions in 60 minutes, and you need 85% (68 correct answers) to pass. What it does test is whether you understand how Developers build, test and release work inside a Scrum Team. Experienced programmers lose marks by trusting habit, and newcomers pass by reading the right two documents carefully.

Scrum.org describes the Professional Scrum Developer certification as evidence that you can deliver quality software with the Scrum framework while working in Scrum Teams, including modern Agile and DevOps practices. The word "Developer" in Scrum is wider than "programmer": it means anyone on the team who builds any part of a usable Increment, so testers, designers, data engineers and architects sit in the same group. This guide is written for those people. It explains what the assessment really measures, which questions are easy to lose, and how to prepare in two to four weeks.
Is the PSD I a coding exam, and who is it really for?
It is not a coding exam. Scrum.org's page lists the format as multiple choice, multiple answer and true/false, delivered in English, so there is no editor, no compiler and no whiteboard problem. The assessment sits in a family of Professional Scrum certifications that all test judgement: given a situation inside a Scrum Team, what does the Scrum framework say a Developer should do, and why?
That is why the audience is broader than software engineers. The credential suits four groups: