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
1answer
52 views

I'm getting this error in some of my check

:) mario.c exists. :( mario.c compiles. expected exit code 0, not 1 :| rejects a height of -1 can't check until a frown turns upside down :| handles a height of 0 correctly can't check ...
0
votes
1answer
49 views

pset6 - range value in for loop

i implemented mario (less) in the following way import cs50 while True: x = cs50.get_int("Height: ") if x > 0 and x < 23: break hashes = 2 for i in range(x-1): for j in ...
0
votes
1answer
292 views

How do I fix these Check50 errors?

Here is the code #include stdio.h #include cs50.h int main(void) { printf ("Height: \n"); int height; do { height = get_int(); } while (23 < height || height &...
0
votes
1answer
236 views

pset1 mario, how do you print the # in the right order

I am confused. How do you construct the basic left aligned pyramid, then add the spaces to the spaces to the left eventually? I don't understand how to get print 2# then next line print 2++ # include ...
0
votes
1answer
117 views

cs50 mario.c more check errors

I could not find the solution for my error on cs50 mario.c/more as my output shows perfectly fine on the terminal but i get check error which I don't understand please help: :( handles a height of 1 ...
0
votes
1answer
44 views

Issues with defining of an int

So, I finally managed to get my Mario working properly. There was, however, one bug that cost me lot of nerves to find and even thought I removed it successfully, I still don't fully understand why ...
0
votes
1answer
89 views

pset1_mario: Almost done! Please help the find error

guys I recently start learning programming, and I am stuck an the mario task. I can't find the error. I check it by using "make filename" command on the terminal, and it didn't show any error. However ...
0
votes
1answer
4k views

pset1 Mario less comfortable, trouble!

include include int main(void) { //USER INPUT int height; do { printf("Insert height:"); height = get_int(); } while (height < 1 || height > 23); //Drawing the hashmid! for (...
0
votes
1answer
114 views

pset1 mario more hlep please!

I'm totally new at programming. and i'm stuck at making mario, so i've searched a lot. I've got an idea from the other questions and made a code, but it looks quite funny. Here's my code. #include &...
0
votes
1answer
996 views

mario.c problem understanding how to print hashes

im having a hard time trying to understand how to print the hashes in increasing order. So far i know how to do the spaces(decreasing order) This is my code right now: /* * Ask the user for a height ...
0
votes
1answer
270 views

Having a problem with Check50 for Mario less

I have been getting an error from the check50 function for my Mario Less program. This is the reply from the check50 function. My codes work according to the specification and my own testings, so I'm ...
0
votes
1answer
224 views

Confused on mario.c 2017.

I'm having trouble with mario.c. It works right for most inputs except 2 and 1 I think. Can somebody tell me what's wrong: #include <cs50.h> #include <stdio.h> int main(void) { int ...
0
votes
1answer
306 views

Mario check50 timeout

I have a timeout problem when I'm checking the more comfortable version of mario app. When I'm running it by myself it works fine, but check50 returns time out in some cases, for example:" :( rejects ...
0
votes
1answer
100 views

Stuck in pset1 mario.c. What am I doing wrong?

#include <cs50.h> #include <stdio.h> int main(void) { int n, i; do { printf("Heigh: "); n = get_int(); }while(n<0 || n>23); for (i=1; i<=n; i+...
0
votes
2answers
81 views

mario.c check 50 error

I get 2 blank lines when I run my mario.c program before it outputs the pyramid for some reason which causes it not to pass check50. Why? #include <stdio.h> #include <cs50.h> int ...
0
votes
1answer
150 views

Problem with printing the # symbols on mario.c

I'm working on the mario staircase right now and everything works so far except printing out the hash symbols correctly. That's the code I've written so far: int main(void) { // declare variable int ...
0
votes
1answer
115 views

pset1 Mario(More) unable to find the error in the code

Below code is my attempt to solve Mario(More). However i do receive error when i use check50 cs50/2017/x/mario/more .I have saved my file and compiled it again. Also submitted the file to cs50.me and ...
0
votes
1answer
78 views

PSET1: Output in Mario (more confortable) is correct but check50 says otherwise

#include <cs50.h> #include <stdio.h> void pyramid(int height); int main(void){ printf("Height: "); int height = get_int(); if (height < 0 || height > 23) { ...
0
votes
1answer
122 views

pset1 expected output mario

Problem at PSET1, Mario (More Comfortable) I have written to output the pyramid as per specs. While they give the correct output when running the program, check50 is giving two errors with input of 2 ...
0
votes
1answer
99 views

Mario Problem Set #1 (Rows not Printing)

I'm having a bit of trouble with my for loops for the less comfortable version of Mario. I set up the outer for loop to keep track of which row is being printed and the inner for loops for printing ...
0
votes
2answers
161 views

pset 1 mario less. Trouble with checks

I am having some of my checks fail in pset1 mario less. Everything seems to work well when I check it by inputting the checks myself, and I cannot seem to figure out what isn't working. Any ...
0
votes
1answer
70 views

mario pset1 check50 has errors, but seems fine to me. No?

Guys, now the check50 is working, but shows me a few errors as you can see on the pic, on height number 1, 2, 23, and 24. And the output seems fine to me, as in according to the specs. (On the pics ...
0
votes
2answers
1k views

how to use check50 on mario pset1?

What's the correct ID to use check50 for mario on pset1 guys? I get "invalid ID" on every check50 ID I use. I thought "check50 2016.mario mario.c" was the one to check, but seems not. Any help? ...
0
votes
2answers
219 views

Can't properly check mario.c less comfortable, something wrong with spacing

I seem to be so close to the end of passing this assignment. My staircase seems to come out perfect, but when I go to check it with check50, I'm told that there appears to be something wrong with my ...
0
votes
1answer
430 views

pset1 more comfortable mario seemingly correct output

int main(void) { int original_height, var_height; // original height and variable height int row_position; do { printf("height: "); original_height = GetInt(); /...
0
votes
2answers
104 views

PSET1 MARIO - the pyramid doesn't appear when i execute the code

I am banging my head against my desk with this. I have written the code and it executes without any errors. However when i input the number to advise how high i want Mario to climb, the mouse cursor ...
0
votes
1answer
73 views

mario2 cs50 check error

I'm having some trouble with the error check. I tried to eliminate the extra spaces, increase number of line by one but still can't pass the error. Here is the loop: for (int i = 0; i < n + 1; i++)...
0
votes
1answer
519 views

PSET 1 Mario calculating spaces

Having a little issue understanding this. in the mario code I'm looking at. // I understand this repeats the loop "pyramid_height" times. all good here. for(int i = 0; i < pyramid_height; i++) /...
0
votes
1answer
100 views

initialization; condition; update in mario.c less comfortable

I am really having a problem with developing the "initialization; condition; update" part of my for loop in my mario (less comfortable) code could anyone help me with understanding what to input
0
votes
1answer
53 views

PSET1 mario.c why if and return

I was banging my head with this. I had to look at others solutions to get my code to work. Here is the code I have, it works now but only because I looked at solution. I had this code written minus ...
0
votes
1answer
1k views

cs50 mario :( handles a height of 23 correctly \ expected output, but not " # #\n ..."

I'm an absolute beginner. Sorry for the long code. It seems to be returning the desired result, i.e. print correct shape and reject number that is our of range. But what's the problem of my code? ...
0
votes
2answers
57 views

while loop gets executed even though conditions inside are not met

while(height >= 23 || height < 0) { printf("Retry: "); height = get_int(); } now if hieght is greater than 23 or less than 0 then only code inside should be executed ...
0
votes
1answer
216 views

Mario.c repeatedly asks for height but does not print

The following is my code for PSET1 Mario.c where the expected outcome is the user is prompted for a height number between 1-23, and based on that number, it builds a half pyramid with the "#" symbol. ...
0
votes
1answer
65 views

Falling to put hashes in every line in mario.c

I manage to put the base of the pyramid and the rows needed, but I fail to put hashes before the base. #include <cs50.h> int main(void) { printf("Height: "); int Height; do { ...
0
votes
1answer
1k views

CS50 2017 Problem Set 6 Mario.py For loop

What is wrong with my second For Loop (spaces)? It seems like it only runs one time, according to the first line of the pyramid. import cs50 while True: print("Type a number between 0 and 23: ", ...
0
votes
1answer
1k views

CS50 2017 ProblemSet6 Mario.py

What is the problem with this simple code? I'm new with Python Also I know Python doesn’t have a do while loop, so instead I use while True, but break, or stop the loop, if n < 0 or n > 23: ...
0
votes
2answers
352 views

I keep getting mario.c:23:9: error: expected '(' after 'for' {

Ive looked everywhere and cant figure out why I keep getting this. I have my curly braces on right I believe and when i put (this code here) after the for loop everybody said it was wrong so Im not ...
0
votes
2answers
129 views

mario less complicated stuck in loop

I have been researching and watching the videos many times and I have spent 3 hours on this code and I have not figured much out. Right now I have the code printing # as only one character in an ...
0
votes
3answers
183 views

pset1 not printing hashes for mario

#include <stdio.h> #include <cs50.h> int main(void) { int height; do { printf("Please give an integer that is less than 23 and greater than 0: \n"); rows = GetInt(); printf("Height:%i\...
0
votes
2answers
425 views

PSET 1 Hacker Mario [duplicate]

The instructions are here: http://cdn.cs50.net/2016/x/psets/1/hacker1/hacker1.html#itsa_mario and here for the full understanding of the basic requirements: http://cdn.cs50.net/2016/x/psets/1/pset1/...
0
votes
2answers
581 views

Mario: Won't Compile

Here is my code so far: #include <stdio.h> #include <cs50.h> int main(void) { int x; #include <stdio.h> #include <cs50.h> int main(void) { int x; ...
0
votes
2answers
231 views

pset1 mario output

im trying to print the pyramid but its not printing as expected i dont understand what went wrong the program works well when i compile and run it how do i fix it? this is my cs50chech result :) ...
0
votes
1answer
104 views

I'm trying to simplify the mario exercise and I can't compile my program

I'm trying to simplify the mario exercise by making my code print the number of hashtags the user inputs for the height without the spaces. Like this: height 4: # # # # #include <stdio.h> #...
0
votes
2answers
276 views

I'm sorry for another Mario question, but I'm stuck on the second half and have read the questions asking for help

This is as far as I've gotten with Itsa Mario. I've got the first part of the problem down just fine, but I'm extremely tripped up by the second part. I'm very curious because I know that the spaces ...
0
votes
1answer
75 views

pset1 hacker1 mario.c, error while checking

this is my code, please tell what's wrong with it #include <stdio.h> #include <cs50.h> int main(void) { int height; do { height = GetInt(); }while(height<=0 || ...
0
votes
1answer
100 views

Could someone pls help me with pset1?

i have been trying to solve this problem : :) mario.c exists :) mario.c compiles :) rejects a height of -1 :) handles a height of 0 correctly :) handles a height of 1 correctly :( handles a height ...
0
votes
1answer
98 views

Pset 1-Do While Loop Not Working

I cannot figure out why the do while loop does not re-prompt the user for a number when the user input falls outside of the range indicated by the boolean expression. Any ideas? Code below: #...
0
votes
1answer
92 views

check50 error message: I'm not sure what is wrong with my mario code here

the error I keep getting says: :( handles a height of 0 correctly \ expected an exit code of 0, not output of "Type an int between 1 and 23 to build M..." however, if user types a 0, my loop ...
0
votes
1answer
127 views

What is the difference between 'printf(" ");' and 'printf("%s"," ");'?

Iam currently working on pset1 mario .when i used printf(" "); to print spaces before hash it didn't work as expected.but then i used printf("%s"," ") it works now .what is the reason behind this?
0
votes
1answer
60 views

Mario bug: Why won't "b" increment as intended?

I'm really close to solving this problem but can't seem to figure out why I'm not getting the correct result (i.e. a pyramid made of #'s that looks like this: http://cdn.cs50.net/2016/x/psets/1/pset1/...

1
3 4
5
6 7
10