Scroll to see replies
def two(a, b):
total = list(map(lambda i: int(str(a) * i), range(1, b+1)))
return total[-1]
two(4, 5))
this is what i have so farSpoiler
counter = 0;
loop = True;
while loop == True:
response = input("");
punctuations = [""]; # insert punctuations here
if response == int or " " or punctuations:
counter = counter + 1;
print("ERROR.");
print(counter);
if counter >= 5: # you can use if statements within if statements (nesting is thing, ya know)
loop = False; # you were not explicit enough on how you want to end the program but this is where you tell python on how you want to end the program
print("END.");
else:
print(); # i like to add this if else statements are empty but it's not necessary
counter = 0;
loop = True;
while loop == True:
response = input("";
punctuations = [""]; # insert punctuations here
if response == int or " " or punctuations:
counter = counter + 1;
print("ERROR.";
print(counter);
if counter >= 5: # you can use if statements within if statements (nesting is thing, ya know)
loop = False; # you were not explicit enough on how you want to end the program but this is where you tell python on how you want to end the program
print("END.";
else:
print(); # i like to add this if else statements are empty but it's not necessary
counter += 1
instead of counter = counter + 1
counter += 1
instead of counter = counter + 1
counter = 0;
loop = True;
while loop == True:
response = input("";
punctuations = [""]; # insert punctuations here
if response == int or " " or punctuations:
counter = counter + 1;
print("ERROR.";
print(counter);
if counter >= 5: # you can use if statements within if statements (nesting is thing, ya know)
loop = False; # you were not explicit enough on how you want to end the program but this is where you tell python on how you want to end the program
print("END.";
else:
print(); # i like to add this if else statements are empty but it's not necessary
Last reply 1 day ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 2 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 1 month ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 1 day ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 2 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 1 month ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]