15,181 Topics

Member Avatar for
Member Avatar for engrjd91

Hello everyone, I have two files i.e Rules.txt and Members.txt. I have set different rules for different members. Now i have break down the rules comma seperately using the for loop. I want to compare each index of the 1st file with the respective index of the second file. If …

Member Avatar for Gribouillis
0
482
Member Avatar for Lazarus777

Hi, i still learning about python. Now i study learning convert ***bandwidth*** (**Byte**) from `ifconfig eth0`to **Kbps** The problem is, my pc using **os windows 7** not **linux/ubuntu** I dont know how to using command `ifconfig eth0` using win7. Any other way to solved this problem?

Member Avatar for Lazarus777
0
283
Member Avatar for Lucas_9

Please help me , I need to convert this C code in Python: #include<stdio.h> #include<stdlib.h> #include<conio.h> main() { system ("color F9"); float preco[150], precoNF, NFPreco_Produto[150]; //Vetores e variáveis que trabalham com preço int a=0, x=0, v=0, rel=0, y, i, aux, cod_exclui, troca; //Declaração de variáveis utilizadas para leitura, gravação, exlclusão …

Member Avatar for Gribouillis
0
1K
Member Avatar for Izio

Hi there, I need some help to finish that code, In fact, there is one problem in my code : The last line, when i tried to convert a hexadecimal number in int. The problem is, I got variables containing : ff or 00 or C6 etc... And i want …

Member Avatar for Izio
0
345
Member Avatar for Mayukh_1

I have a text file in the form like below sourceFiles { hello.cpp, hi.cpp, main.cpp, } headerFiles { hello.h, hi.h, } path { source [ what, how, which, ] header [ include, inc, head, ] } I need to populate several lists from this text file. So far I have …

Member Avatar for jacks009
0
428
Member Avatar for hjos

I need to make multiple instances of a class, then use its methods to find the output. It is straightforward to write the code in multiple lines but I need a more efficient way of doing that. Basically, here is what I want to do in a loop: class test(object): …

Member Avatar for Gribouillis
0
242
Member Avatar for grand_78

Okay so my code is almost complete but I still need one small thing that I can figure out. When running my code it will add 5 when accelerating and subtract 5 when braking, but I need it to display an error when speed >0 when braking, then reset speed …

0
155
Member Avatar for grand_78

Okay so my code works, but I need a few more requirements for it and I can't seem to get them right even though they should be pretty simple. I just need the window to display an error message when the values entered are not numerical and when the values …

Member Avatar for slate
0
231
Member Avatar for Karthik_4

![Screenshot_from_2016-05-05_10:40:29.png](/attachments/large/4/d1a3b93ed36e54fabc134d4a3a268ccd.png "align-center") I am trying to write a python code to verify for the presence of `.mp3` and corresponding `.json` file in the dropbox. dropboxmp3txt = self.driver.find_element_by_xpath('//android.widget.ListView/android.view.View/android.widget.TextView[contains(@index, "1")]') print dropboxmp3txt.text This gives me the output : `abc2016-05-05, 10.38.26.mp3` Which is perfectly fine!!! I need the similar xpath to find the …

0
157
Member Avatar for templar77

Hi, I'm still practice learning Python. I have a litte homework, make Class method, Class Date and Class Delta without using import. it must be like this... `>>> date(2020, 5, 2) + delta(year=5)` `date(2025, 5, 2)` `>>> date(2020, 5, 2) + delta(month=3)` `date(2020, 8, 2)` `>>> date(2020, 5, 2) + …

Member Avatar for Gribouillis
0
364
Member Avatar for Karthik_4

Hi I have around 20 python files. Each time I run these files in the terminal this form one after another : python a.py python b.py python c.py python d.py python e.py python f.py python g.py . . . (I have provided general file names here) This process takes lot …

Member Avatar for Karthik_4
0
13K
Member Avatar for ALosh99

I have this point in (x,y) : ([27.266378342786531], [1.9505463431334713]) Now I want to use this point(I have many points,I want to know how can I use this point first ) to put it in the function below insted of x :(I have tried to make an array put i don't …

Member Avatar for Gribouillis
0
167
Member Avatar for programmer12
Member Avatar for Mickey_2

I saw someone getting an assignment to implement the Vigenere Cipher, so I decided, just for the frig of it, to implement the Caesar Cipher. The algorithm below, however, doesn't account for spaces and punctuation. How can I account for those without redoing the whole thing? from random import choice …

Member Avatar for Mickey_2
0
283
Member Avatar for OnlyThierry

Hello, I would like to create a chess game GUI but I have a problem with my code. When I run my programm, at the beginning, my code is supposed to read a ".lvl" file to place pieces on the chessboard (same method as in Mario Sokoban). However, it doesn't …

Member Avatar for OnlyThierry
0
3K
Member Avatar for genevish

It's a simple script, giving me an error. I'm running it from a command line: scott$ python VerifyAboutPage.py chrome any And the error is: AttributeError: 'module' object has no attribute 'chrome' The relevant portions of the script should be: from selenium import webdriver import unittest, time, re, reporting, sys class …

Member Avatar for Swapna_1
0
853
Member Avatar for ALosh99

I am trying to plot the picewise function below: rho0 = 3*10e-11 Rd = 3.15 Rc = 7 def Density(rho0, r, Rc, Rd): if r < Rc : return rho0 elif r> Rc : return rho0*np.exp(-(r-Rc)/Rd) r = np.linspace(0,20, 1000) y= Density(rho0, r, Rc, Rd) plt.plot(r, y) plt.show() I am …

Member Avatar for ALosh99
0
880
Member Avatar for Mickey_2

Onager Ornery Clicker presents a grid of buttons. One says "Click Me!" and the rest say "Don't Click Me!" Clicking the right button scores a point, while clicking the wrong button costs a point. After each click the buttons reshuffle. There is a timer you can start and stop. You …

Member Avatar for Mickey_2
0
288
Member Avatar for Mickey_2

I'm developing a dirt-simple text editor for personal use, customized the way I like it. My biggest difficulty is with grasping how OOP works. Could you kindly review the following code and suggest improvements (or at least link further information)? Much appreciated. from tkinter import Tk, END, INSERT from tkinter.scrolledtext …

Member Avatar for John_103
0
301
Member Avatar for neerajkumar_86

Hi I have some python file.i runs these file one by one as below on unix server. python f4761sk3.py python f4761sk2.py python f4761sk1.py python f4761se3.py python f4761se2.py python f4761se1.py python f4761pl3.py python f4761pl2.py python f4761pl1.py python f4761no3.py python f4761no2.py python f4761no1.py python f4761nl3.py python f4761nl2.py python f4761nl1.py python f4761ie3.py python …

Member Avatar for Gribouillis
0
2K
Member Avatar for pirulo64

I'm trying to use a "python loop through list" and execute a command on each line from the list found and in between sleep to give it time to finish that command. Here my script. I know it's the basic, but some one can help me to help me in …

Member Avatar for pirulo64
0
278
Member Avatar for Mickey_2

This script is to be a 5x5 grid of buttons, one saying "Click Me" and the rest "Don't Click Me." A correct click scores a point, an incorrect click costs a point. The buttons get shuffled after each click. The player has 60 seconds to maximize his score. The script …

Member Avatar for Mickey_2
0
5K
Member Avatar for zero_1

How to combine two class? so the output can be equal... here's my code.. class year: def __add__(self, year): return (year) class day: def __add__(self, day): return (day) class month: def __add__(self, month): return (month) class Date: def __call__(self, year, month, day): return (year, month, day) class Delta(year, month, day): …

Member Avatar for zero_1
0
315
Member Avatar for btp06b

# This program converts US measurements # to metric measurements. # Constants for valid values VALID_VALUE = 0 MAX_TEMP = 1000 def main(): print(''' 1.Miles to Kilometers. 2.Farenheit to Celsius. 3.Gallons to Liters. 4.Pounds to Kilograms. 5.Inches to centimeters. 6.Exit. ''') input('What would you like to convert?') if selection == …

Member Avatar for Freshly
0
492
Member Avatar for firdevs

question: write in python to take five input values and output: a)the highest value b)the lowest value c)the average (i need help with my homework)

Member Avatar for slate
0
158
Member Avatar for Mickey_2

What software do you recommend for drawing layouts to be implemented in a ttk application? I'm looking for something simple and clutter-free where there aren't 10 zillion options I don't want. All I really need is basic shapes corresponding to the shapes of ttk widgets and a way to place …

Member Avatar for slate
0
127
Member Avatar for ALosh99

Hello, I'm trying to plot this function with using this values: Rh = 9.8 H0 = 0.063 def Thickness_H(H0, r, Rh): return float(H0)*np.exp(float(r)/float(Rh)) r = np.linspace(0,1, 10) x =Thickness_H(H0, r, Rh) plt.plot(r, x) plt.show() I'm trying to defind r like what i know but this dose not work, I'm getting …

Member Avatar for ALosh99
0
309
Member Avatar for grand_78

Hi, I'm working on this problem in my python programming class and need help with part of it. I need to have it display a "F" for anyones grade that is below 60, and also have it display the amount of "F" students, as well as the percentage of students …

Member Avatar for Freshly
1
537
Member Avatar for j.parkerrrr

Help please, im using python 3 and im trying to print the state with maximum and minimum population from a text file...This is what the text file contains. Alabama AL 4802982 Alaska AK 721523 Arizona AZ 6412700 Arkansas AR 2926229 California CA 37341989 Colorado CO 4939456 Connecticut CT 3581628 Delaware …

Member Avatar for slate
-2
358
Member Avatar for grand_78

I need help with just one line. I need an "F" to be displayed on the same line the student with 45 points. I keep getting the "F" to display on a new line below the 45. I guess something is wrong with my if statement. I also need to …

Member Avatar for Brandon Hatch
0
202

The End.