##### Results
Search Results
Post Author Forum Replies Posted [asc]

 1st step: convert ['A','B'] to a single string with a comma like 'A,B' 2nd step: create a new dictionary with key = letter, value = 'A,B'
naughtyCat General Coding Help 2 310 Sep-13-2021, 03:30 PM

 is is used to determine whether two variable reference objects are the same (same memory address) == is used to determine whether the value of the reference variable is equal (same value but different...
naughtyCat General Coding Help 6 646 Sep-13-2021, 08:47 AM

 what u need to do is double up the "\" string = """GIS GIS GIS GIS GIS GIS GIS GIS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\GIS GIS\\\\\\\\\\\\\\\\\\GIS\\\\\\\\\\\\\\\\\\GIS GIS\\\\\\\\\\\\\\\\\\\\\\\...
naughtyCat General Coding Help 12 817 Sep-12-2021, 04:35 AM
Post: RE: Functions: Recursion

 def sequence(n: int): print(n) if n <= 0: return sequence(n-5) sequence(16)Output:16 11 6 1 -4OR def sequence(n: int, arr = None): if not arr: arr = [] arr.append(n) ...
naughtyCat General Coding Help 4 462 Sep-10-2021, 03:18 PM

 you mean like this? entries = [] for key, value in sample['nodeinfo'].items(): if isinstance(value, dict): entries.append([key, list(value.values())]) else: entries.append([key...
naughtyCat General Coding Help 6 483 Sep-10-2021, 07:05 AM

 **wall** **wall** **wall** **wall** **wall** **wall** **wall** **wall** Why complicate it? mydict = dict() Title = 'Rocky'; Rating = 5 for n, i in enumerate(range(Rating, 0, -1), start = 1):...
naughtyCat General Coding Help 12 864 Sep-09-2021, 05:33 AM

 import random x, y = random.randrange(0, 10), random.randrange(0, 10) if int(input(f"what is {x} times {y}\n")) == x*y: print("Correct!!!!") else: print("Wrong answer")
naughtyCat Homework 2 532 Sep-05-2021, 09:06 AM
Post: RE: array manipulation

 arr1 = [0, 1, 2, 4, 8, 3, 5, 9, 6, 10, 12, 7, 11, 13, 14, 15] arr2 = [1, 0, 0, 1, 1, 1, 0, 1] arr3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] x = len(arr1)-len(arr2) for n, i in enumerate(arr1...
naughtyCat General Coding Help 3 416 Sep-03-2021, 09:32 AM

 def answer(cards: list) -> (bool, int): res = None def isStraight(cards: list) -> bool: nonlocal res res = [cards[0]] count = 1 cards.sort() for n...
naughtyCat General Coding Help 12 756 Sep-03-2021, 09:22 AM
Post: RE: print (output)

 There are three ways: command = "Hello World!" print(f"my command is {command}") print("my command is %s"%command) print("my command is {}".format(command))Output:my command is Hello World! my comman...
naughtyCat General Coding Help 3 408 Sep-03-2021, 09:21 AM

 day, month, year = input().split() # input as string day, month, year = map(int, input().split()) # input as integer birthday = list(map(int, input().split())) # input as a list
naughtyCat General Coding Help 9 648 Sep-03-2021, 04:32 AM

 your code is incorrect def get_user_input_1(): user_input = input('Type a number: ') return user_input # here got return def get_user_input_2(): user_input = input('Type another number...
naughtyCat General Coding Help 5 479 Aug-30-2021, 05:54 AM

 this is incorrect if x or y != 'q'should be like this if x != 'q' or y != 'q'or if 'q' not in (x, y) # also correctDonâ€™t treat the code as a human language
naughtyCat General Coding Help 5 479 Aug-30-2021, 05:42 AM
Post: RE: while loop

 arr = [] print('You can enter up to ten names') while len(arr) <= 10: # maximum 10 names flag = input('continue? y / n\n') # loop end flag try: assert flag.lower() in ('y', 'n') except:...
naughtyCat Data Science 2 429 Aug-28-2021, 03:24 PM

 (Feb-27-2021, 08:19 PM)SantiagoPB Wrote: def longestIncreasing(arr): res = [] temp = [arr[0]] for i in range(1, len(arr)): if arr[i] > arr[i-1]: temp.append(arr[i]...
naughtyCat Homework 5 1,383 Aug-27-2021, 04:53 PM

 (Aug-26-2021, 05:24 PM)deanhystad Wrote: ya, you are right, because i never check my code just now, small mistakes I shouldn't make the code should be like this: average = [95] for item in averag...
naughtyCat Homework 7 1,543 Aug-27-2021, 08:21 AM

 (Apr-04-2021, 10:02 AM)danlopek14q Wrote: def func(arr, col = None): if col == None: return '' return [arr[i] for i in col] arr = ['Mars', 'Hot', 22, True] column = [0, 1] print(func(arr, c...
naughtyCat Homework 9 1,256 Aug-27-2021, 04:32 AM

 (Apr-04-2021, 10:37 AM)ibreeden Wrote: (Apr-04-2021, 10:02 AM)danlopek14q Wrote: this is not correct def all_list(listas,column = []): # this is wrongfor example: def func(arr = []): print(arr...
naughtyCat Homework 9 1,256 Aug-27-2021, 04:24 AM

 ...... **doh** **doh** **doh** def func(year): x = 100; y = 5 if year == 1: return x return (func(year-1))*y+x for i in range(1, 5): print(func(i))Output:100 600 3100 15600
naughtyCat Homework 6 1,287 Aug-27-2021, 03:49 AM

 ... **doh** def get_season(month): season = { 'Spring': ['September', 'October', 'November'], 'Summer': ['December', 'January', 'February'], 'Autumn': ['March', 'April', '...
naughtyCat Homework 2 949 Aug-27-2021, 03:37 AM

### User Panel Messages

##### Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020