Questions tagged [mario.less]
The mario.less tag has no usage guidance.
54
questions
-1
votes
1
answer
59
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 ...
0
votes
1
answer
28
views
PSet 1 Mario Less - cube instead of expected stair
I was expecting to see this code print out the stair with the dots, as suggested by the pset instructions. But this is printing out a square, like David's code. But why? What should I do here?
for ...
0
votes
1
answer
29
views
Mario pyramid works, but check50 not buying it
The pyramid looks right, but cs50 says it isn't.
int main(void)
{
int height;
do
{
height = get_int("Specify height. Write a number between 1 and 8: ");
}
...
0
votes
2
answers
38
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: &...
1
vote
1
answer
67
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
32
views
Mario-less Style50 problem, the test is wrong, how to solve
The problem is that style50 highlights the printf(" "); function, everything works, if there is printf("-"); it doesn't say anything, but i need there space not a line.
}
0
votes
1
answer
17
views
how can i get for it reprompt if the user types negative integer or number more 8 . my code does the oppoiste of what i want it to do how do reprompt
I want to prompt user for range to print something but if it user puts negative or more 8 to reprompt.
0
votes
1
answer
14
views
Timed out and Pattern changes
I have two issues with my program.
When I command check50 I have "timed out while waiting for program to exit" in different lines of my program. I've already searched for an answer to solve ...
1
vote
2
answers
241
views
Stumped on PSET 1 Mario Less Comfortable
I've been working on this for a while and feel stuck. I think that my "for" loops might be out of order or some other issue. Suggestions? Thanks
0
votes
1
answer
39
views
Mario hashes come out as equal height by width
for(int i = 0; i < height; i++)
{
for(int j = 0; j < height; j++)
{
printf("#");
}
printf("\n");
}
}
So, that's the output portion I've written.
0
votes
1
answer
198
views
CS50_Mario: How to fix: :( handles a height of 1 correctly expected ""#"", not "" "\n" #""
Here is my code, could you please help me?
int main(void)
{
//ask user for the input
int n;
do
{
n = get_int("Height: ");
}
while (n < 1 || n > 8);
...
0
votes
1
answer
356
views
Mario less, struggling with nested FOR loop
hello I have got my code to work but don't understand logic, I found a flow cart for how nested for loops work and with that I was able to mix things around until I got it to output correctly but ...
0
votes
2
answers
63
views
A problem with my code in PSET 1 Mario less comfortable
I think I have got everything right except when my program is run it prints an extra line without any hashes, can anybody point out or correct my arithmetic (or the code)?
Here's the code:
#include<...
0
votes
2
answers
153
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 ...
0
votes
1
answer
90
views
Pset1 - Mario (less) - White Space
I am having a heck of a time trying to fix my error of "did you add too much trailing whitespace to the end of your pyramid?". It looks identical to me, but obviously I am missing something. ...
0
votes
1
answer
85
views
Cannot compile Mario (less comfortable) in PSET 1
I have finally made code that works and allows itself to be "made". However when I try to compile the code to submit it, it presents me with an error that says "undefined reference to '...
0
votes
1
answer
190
views
Struggling to align pyramid and check for extra spaces at the end of each line in pset6 mario.py less
I'm struggling to meet these specifications - "Be sure that the pyramid is aligned to the bottom-left corner of your terminal, and that there are no extra spaces at the end of each line."
...
0
votes
2
answers
549
views
how do i write pesudocode.txt for Mario? (less comfortable)
After I input:
mkdir ~/pset1/mario
its asking me to write pseudocode.txt and i am not sure how i can do that. I've tried inputting the pseudocode.txt and that gives me "command not found"
0
votes
2
answers
189
views
are we supposed to use the set from hello.c to begin with Mario (less comfortable) or do we need a new terminal and file?
the first thing that the Mario instructions say is this : First, create a new directory (i.e., folder) called Mario inside of your pset1 directory by executing
~/ $ mkdir ~/pset1/mario.
I do not ...
0
votes
1
answer
149
views
My code does what I want it to do, but I get errors with check50 (PSET1, MARIO, LESS)
When I run my code in the terminal it gives me the correct response. However, check50 indicates there is an issue with my spaces. I have spend 2 days looking at it but I dont know whats wrong.
INPUT
/...
0
votes
1
answer
41
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
1
answer
119
views
pset6/less/Mario passing all checks, but score at 90%
My code is getting 9/9 on the check. Visually it seems fine as well. There doesn't seem to be any preceding or trailing empty spaces. The score, however, is 90%. Any help in identifying the mistake ...
0
votes
1
answer
45
views
How do I make the pyramid in mario.c less render normally?
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int n;
do
{
n = get_int ("Height: ");
}
while (n < 1 || n > 8);
for (int i = 0; i < n; i++)
{
for (int j = (i - ...
0
votes
1
answer
455
views
Error: use of undeclared identifier 'j'
My code looks fine but "make mario" insists that "Error: use of undeclared identifier 'j'".
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int n;
do
{
n = get_int ("Height: "...
0
votes
2
answers
77
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
2
answers
55
views
Pset1 How do I get my code to compile as it should?
I'm trying to get my code to compile properly and it just won't. I know the code works when using a printf and scanf but now that I've changed it to get_int and printf it is not working properly. I ...
0
votes
1
answer
45
views
How to make my code print?
So my code printed fine when I used printf and scanf together but when I changed it to the get_int command it no longer prints anything. How do I use get_int and still print my code? The purpose of ...
0
votes
1
answer
71
views
Mario steps: How to make it do the opposite of what has compiled?
How do I make my dots line do the opposite of what it is doing? It looks right if only I knew how to format the code to flip what has been done. How should I be thinking about fixing this? I've tried ...
0
votes
3
answers
79
views
Mario Problem set 1 undefined reference
This is the error I'm getting and I'm not sure why it isn't working because this is how it was done in the example in the lecture. This is done using and for reference. I've looked similar questions ...
0
votes
1
answer
116
views
pset 6 mario, I'm getting wrong ouput
I'm getting an extra new line just after getting input. Help me fix it
while True:
n = cs50.get_int("Height: ")
if n > 0 and n < 9:
break
for i in range(n + 1):
if n == 0:
...
0
votes
1
answer
53
views
Problem set 1 Mario variable issue
I've been staring at my computer for so long trying little tweeks to fix the error message. TLDR how do I stop the shadow message from appearing and initialize variable h? The image looks confusing ...
0
votes
1
answer
72
views
Mario Less Loops doubt and code review
I have attempted the PSET 1 of 2020 CS50x and have a couple of doubts. Could someone check if the following code for Mario less one is correct. If it is I also had a question that what should I put ...
1
vote
1
answer
488
views
CS50 mario pset 1 error: expected '(' after 'do/while'
Here is my code:
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int n;
do
{
printf("height: ");
n = get_int(" ");
}
while
{
(n < ...
1
vote
1
answer
90
views
PSet1: Mario - Less Comfortable (Too many periods)
I recently just tipped my toes into the water of CS50 last week, I'm completely new to this so I need a bit of constructive critisism. I was completed stumped at first, but I got somewhat close - not ...
0
votes
1
answer
248
views
Stuck at pset 1 mario problem
I'm Stuck at the PSET 1 problem of CS50.
for height 3, my output is coming as
..#
..##
..###
Can any peers or experts, look into my code and help me out.
[EDIT: code removed for Honor Code ...
0
votes
1
answer
382
views
Pset 1 mario (less comfortable)
I've been working on this problem for days and I can't figure out how to print the right side of the pyramid. I"m able to print the left side, preceded by a space (denoted by "y) and one hash.
I've ...
0
votes
2
answers
301
views
mario (less) getting 53% score
I submit pset1 Mario (less), and my code works correctly but in cs50.me showing that I have only 53% scores even though that my code work correctly.
#include <cs50.h>
#include <stdio.h>
...
0
votes
1
answer
516
views
MarioLess - declaration shadows a local variable error
Any suggestions on how to fix this error? "mario.c:10:14: error: declaration shadows a local variable" Code sample below. Thanks in advance!
#include <cs50.h>
#include <stdio.h>
int ...
0
votes
1
answer
118
views
Can’t see my error on Mario for loop, rows won’t execute!
I’ve gotten stuck on the Less Comfortable Mario set: the height input portion works, but the loop does not execute. I really wanted to figure this out on my own, but I’ve been stuck for days! Please ...
0
votes
1
answer
647
views
Struggling with Mario (less comfortable) loop conditions
Been struggling with this a few times now and have inserted some additional printf commands to try and understand what's going on with the variables used to control my loops (please see instructions, ...
0
votes
0
answers
106
views
Pset1 mario only executing do-while loop
So i've spent way too much time on this. Didnt expect it to be so difficult. I think i got the coding right but for some reason the program is only executing till the do-while loop and then it exits ...
0
votes
1
answer
91
views
It doesn't work?!!! (Mario less)
Ok so this is my code:
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int n;
do
{
n = get_int("Height: ");
} while (n <= 0 || n > 23);
for (int i = 0; i <= n; i++)
...
0
votes
1
answer
515
views
How to print out hashes in mario(less comfortable)? (2019)
Ok so this is my code I have right now:
#include <cs50.h>
#include <stdio.h>
int get_positive_int(string prompt);
int main(void)
{
int i = get_positive_int("Height: ");
for (i = 0; i < ...
1
vote
1
answer
867
views
Clueless on where to start for Mario (Less comfortable) in CS50 2019
I am currently in the process of finishing Problem Set 1 from CS50 2019, which involves creating a pyramid out of hashes. The pyramid must be made by the user inputting a number between 1 and 8 (...
0
votes
1
answer
85
views
Problem Set 1 - Mario - Less Comfortable - 'expected identifer or '('
I recently started CS50 and I am currently in the process of completing Problem Set 1 - Mario (The less comfortable one). I am really confused by the hash pyramid problem, so I've been trying ...
0
votes
1
answer
59
views
Unable to run file CS50 mario less comfortable. errors while running program
]2
These are the codes and error screenshot which i receive while running programme which i have coded with help from different sources and with my understanding
0
votes
1
answer
90
views
Errors while check50 in Pset1 mario less, expecting suggestions
I am getting following errors with check50. Need help to understand which part of my code cant handle these situations.
:( handles a height of 1 correctly
expected "##\n", not ""
:( ...
0
votes
2
answers
162
views
Why isn't my block on pset1 turning into a staircase?
I am currently working on pset1 Mario, less comfortable. I am running my c to turn the hashtags into a staircase, but when I run the code, it is only a block. What is wrong with my code? Thank you all ...
0
votes
1
answer
132
views
I get an error like make: ***No rule to make target 'mario how to resolve it.'
http://ide.c9.io/parkerdharini/workspace
Here when i compile mario.c i found this error.
0
votes
1
answer
416
views
Can anyone please help with mario less comfortable?
:) 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 ...