Jack Lang
@ArmedWithStew
I'm a ninth grader. I'm young. I love coding as a way of blowing off steam.
It's a very weird altering problem, and I have to get this done by 5/2/20. HELP
Python
mwilki7 this page may help
https://www.geeksforgeeks.org/python-using-2d-arrays-lists-the-right-way/3 years ago
ArmedWithStew Don't worry about the string at the beginning, that's how I'm going to display the array.3 years ago
When I try to alter the 2d list it alters everything in a column, and I don't know why it's doing that.
Python
Geocube101 First of all, DON'T USE KEYWORDS AS VARIABLE NAMES.
str is a reserved name for a builtin function to call an objects str method. You have reassigned it and as a result, no string will work properly. Change your variable name from "str" to something else like "string"
If you create a variable name and it highlights itself, then it is reserved so don't use it3 years ago
My dictionary has 26 values corresponding to each letter in the alphabet. I "for loop" through a string and when I hit a letter, I add one to the valu
Python
Nettakrim what if you loop through each of the items in the dict, get the second value, if its higher than then store the character to and set to the second value
also why is the 0 next to 'z' in '?3 years ago
Comment below how many guesses you got it in! If you have any improvements then comment below also!
Python
How do we erase the printed stuff? For example,
print('Hello world')
erase('all')
How do we erase?
Highwayman Python (only repl.it):
import replit
print("Hello World")
replit.clear()
C/C++ (Linux)
#include
int main(){
WINDOW * wnd = initscr();
printw("Hello World");
refresh();
clear();
}
General solution (the crappy way, pseudocode):
var i = 0;
while i < 1000 :
inc i;
print('\n');
`3 years ago
How do I copy text from Repl? For example, if a program prints out a string, how do I copy that to clipboard?
Why is there a number next to my username and everybody else's?
What is that all about? Also, what is a cycle?
ash15khng The number is the number of cycles you have, which is the number of upvotes you have on repl talk. I don't think there currently is any purpose for these points though.
If you mark this as the correct answer the number of cycles I have will increase :)3 years ago
How do you round a number in python? For example, say I have 5.85. I round up to 6. How do you do that in python?
ash15khng https://realpython.com/python-rounding/
This website could probably help you out. For your example you could probably use math.ceil.3 years ago
For the choices, there will be a number that you type in for that choice. For the Y/N choices, either enter capital Y or capital N.
Python
There was a problem with the first draft so I fixed it! YAY for me!
For the choices, enter the number of the choice you want. And on the Y/N choice,
Python
Vandesm14 Is this supposed to happen?
It's looping
image
And yes, I've tried not doing anything.3 years ago
How do you get a random integer in python? For example, I want to get a random number in between 1 and 2.
ash15khng All the examples require the random module. You can import it into your program by using import random.
If you want an integer:
random.randint(1,2) # returns integer value between 1 and 2 (inclusive)
If you want a random number (float):
random.uniform(1,2)
or
random.random() + 1 # random.random() returns float between 0 and 1
`3 years ago
Not action-packed, not funny, and certainly not fun to play! This is the Game, Part 1!
Python
How do you reverse a string in python? Is it reversed(string) or something?
The game takes place with
Characters: You, Narrator
Settings: A building, slightly expensive ice cream place
Stuff: a gun
Python