# Questions tagged [mario]

mario.c, one of the assignments for Problem Set 1, asks you to develop an algorithm to draw an ASCII art staircase similar to those seen in the classic Nintendo game.

487 questions
Filter by
Sorted by
Tagged with
143 views

### help fixing the spaces on mario's pyramid

I need some help figuring out how to change the number of spaces on each line of the pyramid. The pyramid comes out with 5 spaces at the beginning of each line instead of 4, then 3 then 2, etc. I ...
• 41
101 views

### Mario-less code clarification

I passed through a mario-less from pset1 and after that I checked on Youtube some videos to get a good explaination because I couldn't clearly explain every detail of my code. And I was really ...
• 17
25 views

### Hi, Can some one please check why this error code is there, Mario Less, see part of code and error message below, thanks

Sorry, here is the code in full with a few format alterations, thanks #include <cs50.h> #include <stdio.h> int main(void) // Get input of the height { int n; do { n = get_int(...
• 11
23 views

### Hi, can you please identify the error in this Mario less , see part of code below, thanks

int main(void) // Get input of the height { int n; do { n = get_int("Height: "); } while ( n < 1 || n > 8 ); } // Print desired pyramid height for(int i=0 ; i<n; i++); Error ...
• 11
54 views

### pset 1 mario less comfortable

I don't know how to put the dots. In walkthrough we are told come with formula but I don't know how to come up with formula. I have no idea what to do. }
43 views

### PSET 1 - Mario Less - Missing one last thing

I am missing one thing in the code because it's printing me the dots in every height case.. Can anyone give me a hint how to solve that ? int main(void) { int n; do { n = get_int("Height: &...
45 views

### pset 1 mario style

I don't understand what is wrong about the style. Style50 indicates there is a problem with "int height" and "printf(" ");" in the k inner loop. Can someone explain what ...
26 views

### I think I'm missing a basic thing here

i'm unable to run this first step to solving the problem this is what i've entered it won't "make mario" what am i missing? #include <cs50.h> #include <stdio.h> int main(void); ...
1 vote
74 views

### Problem with check50's result for pset1 mario less

I think my code can correctly print the pyramid,but it result errors in check50. What does that error in check50 means? Results for cs50/problems/2022/x/mario/less generated by check50 v3.3.7 :) ...
70 views

### cs50 Week 1 - lecture example of Mario Bricks - how to take multiple inputs for different height & width

//To clarify, this question is not about the problem set...this was just me being curious while taking notes during the lecture. Professor Malan showed a Mario background with a variety of walls of ...
77 views

### The "Code Command" did not work for me in "code mario.c" - August 28th, 2022

This is my first post here. I'd like to know why the "code command" did not work for me (code mario.c). I was trying to create a file as the professor did. This command is used by the ...
60 views

### Pset1 Mario-More. When i try to compile it says "height" is uninitialized and i need to give it a value but isnt that what the "get_int" is for?

#include <cs50.h> #include <stdio.h> int main(void) { //get height int height; do { get_int ("Height: ");} while ( height <1 || height >8); // for (int y = ...
199 views

### PSet1 - No such file or directory

I am working on pset1, mario-less comfy, and while trying to test the code to prompt for height, I am running into an message stating that there's no such file or directory. Can someone please help ...
91 views

### pset1 Mario error: expected identifier

I really tried to find the solution for myself, but after a lot of hours I give up. Here is the error message and code if its possible please help me:) #include <cs50.h> #include <stdio.h&...
125 views

### Mario.c:19:36: error: use of undeclared identifier 'row'

I am not sure what I am doing wrong... I made 16 same errors of different identifiers but I am not sure why
93 views

### make: Nothing to be done for 'Mario'

I am confused.... :( Am I in the wrong directory?
66 views

### What is wrong with my Mario

could you please point out what I am doing wrong? I guess the problem is in the second loop - but how do I fix it? Thank you #include <cs50.h> #include <stdio.h> int main(void) { int ...
559 views

### What does it mean when it says "error: expected ';' in 'for' statement specifier"? It is referring to " for (k <= n; k--)" ... what's wrong with that?

This is for the Mario pyramid. I am having trouble with it. I finally got the left sided one working but I can't figure out how to put my .s and my #s on the same line when trying to make the side ...
113 views

### My program is not working

I am working on pset6 Mario. When I am running my program it is showing me some errors. But I think my code is correct. Here is my code: from cs50 import get_int row = 0 space = 0 insert = 0 ...
64 views

### How do I change if/else if statements into a loop?

I cannot figure out how to change the following code into a loop. This is just a portion of a larger code where n is defined by user input. How do I create a loop that adds one "#" to each ...
• 14
234 views

• 1
158 views

### mario more (python)

I've tried to make my code efficient by reducing the number of loops/print functions compared with my solution in c. My code works, but check50 isn't happy with it -- apparently an extra space is ...
271 views

### make mario won't work but i'm in the correct directory

make mario won't work but I'm in the correct directory. I haven't even started writing the solution properly as I'm stumped on getting it to compile. Any suggestion? I tried restarting the IDE and ...
387 views

### cs50 mario MORE comfortable need LOTS OF HELP

so ive been stuck on this problem for a about a week, took lots of note and downloaded the lecture just look back on even took notes for the shorts on week one. now what i clearly need is to be taught ...
• 3
199 views

### Mario (less) PSET6 Python Spacing help

Slightly embarrassed to be posting this as I could succesfully complete mario(less) in pset1 but apparently cannot replicate it in Python. My code is as follows: h = int(input("h: ")) # get ...
82 views

### pset1 mario (less comfortable), expression error

I keep getting 'expression error' when I try to compile my code; any help would be appreciated. Code is as follows: #include <stdio.h> #include <cs50.h> int main(void) { // prompt ...
171 views

### Getting error on cs50 problem set 1 mario "handles a height of 1 correctly,timed out while waiting for program to exit"

Getting error on cs50 problem set 1 Mario "handles a height of 1 correctly, timed out while waiting for program to exit" Here's my code: #include <stdio.h> #include <cs50.h> int ...
• 13
87 views

### Pset6 mario more didn't pass the test

I run through my code many times and didn't find anything wrong with it but the result printed out wasn't right: from cs50 import get_int while True: height = get_int("How high is the pyramid?...
• 3
137 views

### Pset1 - Mario less printing 2 extra spaces

I have submitted mario.c and while it printed the pyramid, it is printing 2 extra spaces in front of each hash row. What am I missing here? #include <cs50.h> #include <stdio.h> int main(...
52 views

### Could someone explain to me how curly braces work?

#include <cs50.h> int main (void) { int height; do { height = get_int ("Enter Height"); } while(...
297 views

### I keep getting the following error when I use the Check50

You seem to be missing these required files: mario.c You are currently in: ~, did you perhaps intend another directory?
509 views

### Pset1 Mario - right-align the bricks - for function?

I've reached the point where I can create a pyramid but have an extra dot in the last row. Can't seem to remove it . Is there something i'm doing wrong in the nested 'for' function? #include <...
• 28
1 vote
80 views

### PSET 1 Can't implement loop at the prompt

I'm still on my prompt part, couldn't get to the pyramid yet, my code compiles but I can't make the loop recursive, that is, after the first entry it goes back to the prompt \$. Here is the code: #...
• 29
150 views

### Help with Problem Set 1 Mario (less)

I have no idea what I am doing wrong here. Everything works just as specified, but for some reason I am still getting error messages. Please do not look at this if you have not already solved the it ...
566 views

### PSET6 Mario Python

I have been experiementing with this code for a couple hours and have come across an issue with each implementation. I can no longer put in any time at the moment so I figured I would go ahead and ask....
1 vote
160 views

### pset1 (mario, more) - problem with unwanted leading spaces

This is what check50 gives me: > :( handles a height of 1 correctly > expected ""# #"", not "" "\n"# #"" > :( handles a ...
121 views

### Error Code - Use of undeclared identifier in PSET 1, Mario

An error code popped up while trying to compile my code, saying that the variable n had not been declared earlier. It had been declared however at the beginning. Here is the code and the terminal ...
56 views

### Query related to Mario program(more) in CS50 pset1

I can't figure out the problem in my code, it successfully creates a pyramid but doesn't reprompt when value other than 1-8 is entered, also it gives a space before printing the pyramid, causing ...
73 views

### mario more comfortable; "can't check until a frown turns upside down"

[EDIT: Code removed for Honor Code compliance.] The code seems to be running perfectly fine and gives the correct output But every time i try to check it, i get this: :) mario.c exists :( mario.c ...
150 views

### mario less comfortable help

I wrote this code for the mario problem but idk if it's right. i'm having trouble running it. It keeps saying error: linker command failed with exit code. #include <cs50.h> #include <stdio.h&...
• 7
289 views

### Unable to compile pset1. Mario (Less comfortable)

I am unable to compile my file and get many errors. INPUT #include <cs50.h> #include <stdio.h> int main(void) //Prompt for the height of the pyramid int height; height = get_int (...
209 views

### My 'pset1 Mario more comfortable' is returning check50 errors whilst seemingly correct

I saw this question has been asked in multiple ways before but I believe I've checked answers and am still stumped as to the issue I have. The output for my pset1 Mario more comfortable appears to be ...
1 vote
91 views

### mario pset 1 starter issue

hey im having problems getting started with the mario pset. my code is below and i am getting these errors... any help would be so much appreciated thanks. mario.c:16:5: error: expected expression ...
• 25
198 views

### PSET 1 Less comfortable Mario

I have been writing this code for a day but I still could not get the result I want, I don't even know how the is giving me a weird result. Here's my code: #include <cs50.h> #include <stdio....
1 vote
136 views

### PSET1 Mario pyramid - Can someone explain me the logic of this line of code?

I was able to make the Mario's pyramid from Problem Set 1, (I know it should be right alligned, not left). This is the code, and it is working fine when I execute the program, but I don't seem to ...
41 views

### Errors on Mario pyramid

I thought had solved the Mario Pyramid problem until I got back all these errors :( handles a height of 1 correctly Cause expected ""# #"", not "" # # ..." :( handles a height of 2 ...
46 views

### No rule to make target 'mario'. Stuck on where I am going wrong. Cannot compile existing file

I have viewed similiar question/answers on this site and still cannot troubleshoot where I am going wrong. The mario.c file exists in the mario folder. It just will not compile from what I can tell. ...
109 views

### Do - While loop

I am trying to do the Mario problem with C. The issue is that I want the user to select a number from 1 to 8. So my boolean expression is (n < 9 && n > 0). But I don't know why is not ...