15,181 Topics
| |
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 ")) … | |
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 … | |
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) … | |
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 … | |
What are the byte values of basic data types : char , int , long , long long, float, double.?(using sizeof() )? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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) … | |
I am new in c++, java and python | |
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 … | |
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 | |
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 … | |
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 … | |
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, … | |
function to add two numbers, taking as arg/param & using inputs. | |
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 … | |
Send plz python micro project title & source code | |
i am completly stuck with some problems in programming, talking exactly aboutt linked list and some others can anyone help me? | |
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) |
The End.