-
Hello! I got stuck in this error! I can’t figure it out what exactly wrong with this code. Could you explain me, please? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Could you explain what you are trying to do? The immediate problem is that the At a larger scope, it looks like you expect the
Though it’d make more sense to skip the split and directly use a list:
|
Beta Was this translation helpful? Give feedback.
-
Firstly I am so thankful for your response @airtower-luna I just tried what you told me that just using directly a list but it didn’t help me. I couldn’t see still the output like in the solution below: |
Beta Was this translation helpful? Give feedback.
-
Well, if you want help you’ll have to describe the actual problem: what are you doing (in this case: code!), what is happening, what do you expect to happen instead? That screenshot covers only the last part. |
Beta Was this translation helpful? Give feedback.
-
Sorry I have tried to put two more photos but I couldn’t because I am just a new member, I am not allowed to put more photos. But I copied and pasted below what the problem is: Quiz: Generate MessagesImagine you’re a teacher who needs to send a message to each of your students reminding them of their missing assignments and grade in the class. You have each of their names, number of missing assignments, and grades on a spreadsheet and just have to insert them into placeholders in this message you came up with:
You can just copy and paste this message to each student and manually insert the appropriate values each time, but instead you’re going to write a program that does this for you. Write a script that does the following:
Template code for your script:
|
Beta Was this translation helpful? Give feedback.
-
What @airtower-luna and others are looking for is the code that you’ve currently written. Copy it from your terminal / editor / browser, and paste it as a reply here using the “preformatted text” icon. We don’t want screenshots, we want text. Based on your template code, the program needs to prompt for input, and you, as the user, must manually enter the data. As @airtower-luna points out, you need to use
You then would type in the necessary string, i.e. |
Beta Was this translation helpful? Give feedback.
-
Right now I got it! It was my foolishness that I thought the code gets the inputs automatically… Thank you so much both @fire-eggs and @airtower-luna |
Beta Was this translation helpful? Give feedback.
-
Don’t beat yourself up about this! Not foolishness - ignorance. Ignorance can be corrected, you are learning and we all had to learn this stuff some time! |
Beta Was this translation helpful? Give feedback.
What @airtower-luna and others are looking for is the code that you’ve currently written. Copy it from your terminal / editor / browser, and paste it as a reply here using the “preformatted text” icon. We don’t want screenshots, we want text.
Based on your template code, the program needs to prompt for input, and you, as the user, must manually enter the data. As @airtower-luna points out, you need to use
input
correctly, e.g.:You then would type in the necessary string, i.e.
81,77,92,88
.