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.

Filter by
Sorted by
Tagged with
0 votes
2 answers
14 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: &...
0 votes
1 answer
9 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 ...
0 votes
0 answers
17 views

CS50 PSET1 MARIO Pyramid inverted

I am beginner in coding. I have drafted the code to build 1 pyramid for Mario. However, it's coming inverted... Any ideas? int height; do { height = get_int("Height: "); }...
  • 1
0 votes
1 answer
17 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
1 answer
40 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 :) ...
0 votes
2 answers
48 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 ...
0 votes
0 answers
140 views

Is this solution from cs50 problem set 1, mario(less comfortable) a good one? I kinda understand this over the nested for loop one. The code is below

#include <stdio.h> #include <cs50.h> //Print character in a line a certain amount of times. void print_char(int n, char c) { for(int i = 0; i < n; i++) { printf(&...
0 votes
1 answer
39 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 ...
0 votes
1 answer
52 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 = ...
0 votes
2 answers
119 views

Problem set 1 instruction

I am unable to make Mario in Problem set 1. Are there any step-by-step instructions out there?
0 votes
1 answer
107 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 ...
0 votes
0 answers
80 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&...
0 votes
1 answer
90 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
0 votes
1 answer
76 views

make: Nothing to be done for 'Mario'

I am confused.... :( Am I in the wrong directory?
0 votes
1 answer
65 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 ...
0 votes
1 answer
304 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 ...
0 votes
1 answer
91 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 ...
0 votes
1 answer
60 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
0 votes
1 answer
135 views

Please help me. *** No rule to make target 'mario'. Stop

I can not compile my code. Please give me some advice.
  • 1
0 votes
2 answers
114 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 ...
0 votes
1 answer
214 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 ...
  • 3
0 votes
1 answer
271 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
0 votes
1 answer
149 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 ...
0 votes
2 answers
79 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 ...
  • 5
0 votes
2 answers
117 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
0 votes
1 answer
80 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
0 votes
1 answer
101 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(...
0 votes
2 answers
48 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(...
0 votes
1 answer
137 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?
0 votes
1 answer
342 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
3 answers
79 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
0 votes
1 answer
152 views

Please help!! Pset 1: creating a pyramid

I have been struggling with pset1: creating a pyramid for a long time. I am reading other people's codes to learn the logic but I still cannot understand what is going on. Would you please explain the ...
0 votes
1 answer
140 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 ...
user avatar
0 votes
3 answers
482 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
2 answers
147 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 ...
0 votes
1 answer
84 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 ...
0 votes
1 answer
49 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 ...
0 votes
2 answers
66 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 ...
0 votes
2 answers
144 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
0 votes
1 answer
262 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 (...
0 votes
1 answer
167 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
3 answers
85 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
0 votes
1 answer
181 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
1 answer
128 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 ...
0 votes
1 answer
40 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 ...
0 votes
1 answer
36 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. ...
0 votes
2 answers
93 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 ...
0 votes
2 answers
71 views

Pset1 Program does not stop printing dots dots/spaces for the pyramid and I don't understand why

After a certain number of iterations through the loops (lines 16 to 21), I expect the program to stop printing out dots since the "dotcount" should be equals to 0. However, an unnecessary dot is still ...
0 votes
0 answers
97 views

i use terminal to run mario stuff in my mac

i downloaded cs50 header file and tried <> , "" both but Undefined symbols for architecture x86_64: "_get_int", referenced from: _main in mario-af47a4.o ld: symbol(s) not found for ...
0 votes
2 answers
78 views

When printing mario problem the second triangle appears below the first one

#include <stdio.h> #include <cs50.h> int main(void) { //This do while loop checks if user entered number 1-8 int x; do { x = get_int("Height: "); } while ...
  • 1

1
2 3 4 5
10