In her computer coding class, Janteria Riley creates a character and then tries to figure out how to get it to do things. Mostly, it does what it’s told and she’s happy.

But not always.

“Sometimes I’ll be frustrated when I give a command, and it disobeys me,” said the 11-year-old.

That Riley and her classmates at Baton Rouge College Prep are learning computer coding at all is unusual. Computer programming is typically taught no earlier than high school, if at all and, even then, usually just as an elective. Riley is only in sixth grade.

Baton Rouge College Prep, which opened in August, is requiring every one of its roughly 100 students, all fifth- and sixth-graders, to take basic computer coding. They get instruction once or twice a week and will continue learning computer science all the way through 12th grade as the school expands.

Three charter schools, including Baton Rouge College Prep, occupy space at the former Glen Oaks Middle School.

Charter schools are public schools run by private organizations.

Baton Rouge College Prep’s mission is to shepherd its students, the vast majority whose families live in poverty, into college and beyond.

“Coding was an ideal choice for us. It teaches perseverance, problem-solving and teamwork,” said Kathryn Rice, school director and founder. “It marries technology, science, math and creative arts, and it’s fun.”

Rice said she pinched the idea from RePublic Schools, a Nashville, Tennessee-based network of charter school chains she visited while developing her plans for Baton Rouge College Prep. She also is making use of a coding curriculum RePublic has developed.

Just as Rice started her computer coding classes last month, President Barack Obama announced a new initiative to greatly expand computer programming in elementary and secondary schools. Called Computer Science for All, the president is asking Congress for more than $4 billion to train teachers nationwide in computer science.

“Computer science isn’t an optional skill, it’s a basic skill, right along with the three R’s,” Obama said. “Nine out of 10 parents want it taught to their child in school. Right now, only a quarter of our K-12 schools offer computer science.”

Even for children at Baton Rouge College Prep versed in technology, coding was not that familiar when first introduced.

AuJyri Harris, 12, said he’s been working with computers since he was 5 and once created a Web page on Instagram.

Most of the students knew much less.

“I didn’t know what she was talking about,” Riley recalled thinking when her sixth-grade science teacher, Chelsea Werner, first told the class what they would be studying.

Werner herself is new to the subject. Along with her fifth-grade counterpart, Dadrius Lanus, Werner is learning coding just ahead of her kids.

She said her main challenge has been finding the time to bone up on coding in addition to preparing her daily science lessons. Although she has no prior training in computer programming, Werner said she’s comfortable with technology.

“I don’t think it’s so specialized that people couldn’t figure it out,” she said.

Czarina Walker works with many educators trying to expand computer science in the Baton Rouge area, and she said most of those she works with are not so comfortable with the subject. Walker, the CEO of InfiniEDGE Software in Prairieville, said teachers, most of whom are women, have never been encouraged to learn how technology works.

“This is the same group we’re asking to teach about technology, and they are scared out of their minds, and I can understand why,” Walker said.

People who work in technology have their own fears, she said.

“Industry people are freaked out over dealing with a bunch of kids,” she said.

Walker has focused her energy on helping support a series of student clubs and coding camps that have sprung up in the past couple of years. At Spanish Lake and Galvez primary schools in Ascension Parish, she oversees student clubs where fifth-graders learn the basics of coding. She’s volunteering with two camps this month that are focused on girls and technology, Rail Girls Baton Rouge and IT Girls 3.0.

The most ambitious effort is a series of Saturday workshops that started last year on the campuses of Baton Rouge Community College and Southern University Lab School. Called The Futures Fund, it focuses on north Baton Rouge children between the ages of 14 and 18. Walker is one of several digital instructors participating.

Walker said she recognizes the clubs and camps are only a partial solution, with more needed to really expand computer science.

“It really needs to be tied into curriculum in schools, but I don’t have enough lifetimes to fight that battle,” she said.

Baton Rouge College Prep is rare in bringing computer science into the classroom so early. But it’s not the only school in the area making a splash in this field.

Kenilworth Science and Technology School, a middle school in Baton Rouge, for instance, requires computer science one semester a year for every student. Mark Lambert, a spokesman for the charter school, said the students in those classes learn the fundamentals of coding in the computer languages Python and Java.

Southeast Middle School, a Baton Rouge public school, launched a magnet program in August with about 90 students. Some of those students are focusing on digital communications. John Hayman, coordinator of the program, said he’s introducing students to Python, which he said is a bit simpler than Java. He said it’s been eye-opening.

“I think the ‘aha’ is that they realize it’s really another language,” Hayman said. “There are rules just like grammar rules in English.”

In college, Hayman majored in information technology and, as a result, took several coding classes, making him an oddity among his fellow teachers.

“Most of the people like me are out making a lot more money right now,” he said with a laugh.

At Baton Rouge College Prep, children are starting with what’s known as “block coding.” A precursor to formal computer languages, block coding involves precisely sequencing bundles of code grouped together as commands in order to carry out tasks.

Werner said students are improving their ability to follow explicit instructions, as well as boosting their skill in sorting out puzzles where the answers aren’t obvious or “spoon-fed by the teacher,” as too often happens.

“The part that is really challenging and continues to be challenging is the independent problem-solving,” she said. “That is the biggest benefit of coding.”

Some students at Baton Rouge College Prep are trying out exercises provided by code.org, known as “Hour of Code.” Others are working on a more open-ended program known as Scratch, offered by the Massachusetts Institute of Technology.

Walker, of InfiniEDGE, said although online coding tools continually improve, they are not a substitute for instructors.

She recalled a recent class where children were getting frustrated trying to puzzle out Apple’s requirements for developers of applications. She soon had to jump in to help.

“If they get stumped, they are really going to be throwing up their hands,” she said.