15,181 Topics

Member Avatar for
Member Avatar for Jan_102

import math import numpy as np import matplotlib.pyplot as plt print("y = a^x + b") jarda=0 while jarda<=0 or jarda==1: jarda=int(input("zadej a ")) def v() : while True: číslo=(input("zadej b ")) try : return int (číslo) except ValueError print("nebylo zadané číslo") barca=b() A = int (input("zadej počáteční hodnotu def.oboru ")) …

Member Avatar for Reverend Jim
0
48
Member Avatar for @Mathabo

GUESSING GAME HERE please help im new in this python programming 1. This is a game that allows a user to play guessing one single number to try to win at a maximum of 3 attempts. The possible numbers to win must be stored in a list or tuple or …

Member Avatar for rproffitt
0
61
Member Avatar for Griffin_3

nlp = spacy.load("en_core_web_sm") Error found OSError Traceback (most recent call last) <ipython-input-3-8d092272a28e> in <module> ----> 1 nlp = spacy.load("en_core_web_sm") ~\anaconda3\lib\site-packages\spacy\__init__.py in load(name, disable, exclude, config) 45 RETURNS (Language): The loaded nlp object. 46 """ ---> 47 return util.load_model(name, disable=disable, exclude=exclude, config=config) 48 49 ~\anaconda3\lib\site-packages\spacy\util.py in load_model(name, vocab, disable, exclude, config) …

Member Avatar for Dani
0
175
Member Avatar for Ayna_1

Hi! When I am running this code, the output looks how I expected it to be, but the problem is that I cannot go back to home page whenever I want to. I dont know why but when I tried to go back to home page after visiting the tips …

Member Avatar for rproffitt
0
68
Member Avatar for Jonah_4

What are the byte values of basic data types : char , int , long , long long, float, double.?(using sizeof() )?

Member Avatar for Husoski
0
139
Member Avatar for Deekshitha
Member Avatar for Hugo Edson

I wrote this line of code: database = {"host":host, "user":user, "password":password, "db":db, "charser":charset, "cursorclass":cursorclass} and i'm receiving this: {'host': '35.234.92.142', 'user': "b'freedbtech_'", 'password': "b''", 'db': "b'freedbtech_cursopython'", 'charset': 'utf8mb4', 'cursorclass': "<class 'pymysql.cursors.'>} i need to remove those "b's" and " ' " in the strings, but i don't know how to …

Member Avatar for rproffitt
0
105
Member Avatar for Liam_12

Am at an intermediate level in python and tkinter, and have been trying to figure out how to get the code below into some kind of workable form I can understand. What I want to do is, like, if I typed something into the bottom frame, then I'd like to …

Member Avatar for Husoski
0
172
Member Avatar for zattat

import threading,time,sys try: import requests except: print("Please install requests module!") sys.exit() path=input("File (example: file.m3u) => ") out=path+"_out.txt" try: with open(path, 'r') as file_in: lines = file_in.read().splitlines() except: print("File error or not found!") file_out=open(out, "w") #print(str(lines)) all = len(lines) print(all) worked=0 print("Scanning {} lists... Worked will write in {}".format(all,out)) time.sleep(5) def …

Member Avatar for rproffitt
0
50
Member Avatar for zattat

import threading,time,sys try: import requests except: print("Please install requests module!") sys.exit() path=input("File (example: file.m3u) => ") out=path+"_out.txt" try: with open(path, 'r') as file_in: lines = file_in.read().splitlines() except: print("File error or not found!") file_out=open(out, "w") #print(str(lines)) all = len(lines) print(all) worked=0 print("Scanning {} lists... Worked will write in {}".format(all,out)) time.sleep(5) def …

Member Avatar for Reverend Jim
0
134
Member Avatar for Jean_19

for(#iterations) solve non linear solution get new flux klinkages solve LD and Lq solve new Id and Iq if (abs(Id_new - Id_old) < 0.01) break else put in the new Id_new and Iq_new

Member Avatar for rproffitt
0
117
Member Avatar for TimTheCoder

I have an array in python that has letters as strings and a comma as a string also. I have managed to find code that finds all the letters that come before that comma letter, there are other comma letters and i would like to iterate to list every letter …

Member Avatar for Husoski
0
57
Member Avatar for The_real_Aadi

Hey fellow Daniweebs, I would like to present a code to you, which seems to be not working for some reason , kindly help me name = input("Enter your name: ") age = input("Enter your age: ") if type(name) != str or type(age) != int: print("PLEASE ENTER VALID CREDNTIALS", end …

Member Avatar for Reverend Jim
0
31
Member Avatar for Tonittoh

each quarter the marketing manager of a retail store divides the customers into two groups based on their purchase behavior in the previous quarter. The classes are denoted by L and H. The manager wishes to determine to which group of customers he should sent a catalog. The cost of …

Member Avatar for Dani
0
47
Member Avatar for awk18

Lines=["1x+1y+0","1x-1y+0","1x+0y-3","0x+1y-0.5"] So, How do we extract coefficients of each equation in the list?

Member Avatar for rproffitt
0
12
Member Avatar for Deepak_71

I have my resoruces stored in mysql DB: eg : > |IPaddress | Status| |10.x.x.x| yes| |10.1.x.x| yes| I am trying to get the available resource and after that will update DB with status No. > query = ("SELECT IPaddress from TABLE where status='yes'") cursor = mydb.cursor() cursor.execute(query) result=cursor.fetchall() query1 …

Member Avatar for Dani
0
45
Member Avatar for Yumensh

The code: using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Attributes; using NadekoBot.Core.Services; using NadekoBot.Extensions; using NadekoBot.Modules.CustomReactions.Services; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace NadekoBot.Modules.CustomReactions { public class CustomReactions : NadekoTopLevelModule<CustomReactionsService> { private readonly IBotCredentials _creds; private readonly DbService _db; private readonly DiscordSocketClient _client; public CustomReactions(IBotCredentials creds, DbService db, DiscordSocketClient client) …

Member Avatar for rproffitt
0
77
Member Avatar for Simiyu
Member Avatar for joe82

Hello everyone, I am writting a code where result is not coming correct because I am not able to join 2 lines to make a single line. Please help me e.g my input file is: AATTCCGGTTT CCTTAACCCCC I want my code to first join them together as AATTCCGGTTTCCTTAACCCCC and then …

Member Avatar for vishakha_3
0
22K
Member Avatar for Satyajeet_1
Member Avatar for Prajkta_2

Create a code using python of random walk where food is placed in spots on the grid. Whenever a Walker runs into the food it eats it and reproduces

Member Avatar for rproffitt
0
150
Member Avatar for aliabd

Hi guys how are you please why When I run this code it does not work but when I change the ( tn.write(b"config t \n") tn.write(b"router ospf 10 \n") to the show command it works fine ?? **************************************************************************************************************** import sys import telnetlib import getpass host=["192.168.1.164","192.168.1.169"] devno=len(host) user='ali' Password='cisco' for i …

Member Avatar for aliabd
0
53
Member Avatar for Gabriela_4

Hello! So I have this homework that i have no idea how to continue. this is an exemple of input,but i have to do it for a general one: **7 pencils car ball candy tshirt bike video_game Mike Andrew Inna** and the output must be like this: **Mike: pencils candy …

Member Avatar for rproffitt
0
168
Member Avatar for Aleks_Retr0

Hello Guys! I'm new in python and started creating this code without any experience and of course I can't know a lot about coding and I will do a lot of stupid mistakes, and this case is not exception as well. I tried to assign option menu to my list, …

0
323
Member Avatar for JNSS
Member Avatar for Rahul_53
0
64
Member Avatar for Charlie_13

Python program that will 1)Define a single point for the red/green dot near the supposedly enemy territory; 2)Define a subset A of your DEM raster image towards the friendly territory; 3)Calculate the line of sight for each pair (of observation pixel to target pixel); 4)Sum the total number of green …

Member Avatar for rproffitt
0
51
Member Avatar for ferrerjulie
Member Avatar for Pratiksha_5
Member Avatar for euubisse12

i am completly stuck with some problems in programming, talking exactly aboutt linked list and some others can anyone help me?

Member Avatar for Naheedmir
0
114
Member Avatar for Rabana_1

def Count_Total_Words(str1): total = 1 for i in range(len(str1)): if(str1[i] == ' ' or str1 == '\n' or str1 == '\t'): total = total + 1 return total string = input("Please Enter your Own String : ") leng = Count_Total_Words(string) print("Total Number of Words in this String = ", leng)

Member Avatar for rproffitt
0
130

The End.