15,175 Topics

Member Avatar for
Member Avatar for Hicham_4
Member Avatar for vegaseat

Let's say you want to send a short private message to your friend, but don't want grandma to snoop around and find it. One way is to use the Python Image Library (PIL) and hide the message in a picture file's pixels. Just looking at the picture you will barely …

Member Avatar for JamesCherrill
5
10K
Member Avatar for Mike_63

Hello, I need help on getting solution for the below python code. The code gives the required output which is that it dispaly number of prime number that user wants. if user inputs 4 Actual Output: 2, 3 , 5 , 7 The main question is that I do not …

Member Avatar for vegaseat
0
630
Member Avatar for SaRaVaNaN_2

import csv import xlwt import os import sys #import openpyxl # Look for input file in same location as script file: inputfilename = os.path.join(os.path.dirname(sys.argv[0]), 'book2.txt') # Strip off the path basefilename = os.path.basename(inputfilename) # Strip off the extension basefilename_noext = os.path.splitext(basefilename)[0] # Get the path of the input file as …

0
354
Member Avatar for HimaniBansal
Member Avatar for Sheetal_1
Member Avatar for sabrin4

Initially, I've a simple program to print out the whole output to the console. **Initial Code to display output in the console only** import os, subprocess print("1. Before") os.system('ver') subprocess.run('whoami') print('\n2. After') **Output in console** 1. Before Microsoft Windows [Version 10] user01 2. After Then, I decided to have a …

Member Avatar for rproffitt
0
517
Member Avatar for Isaiah_4

You must then use a loop (for or while) to find the sum of all the numbers in the geometric sequence of 3 less than N. The geometric sequence of 3 looks like this 1, 3, 9, 27, 81, 243, ... where you start with the number one and multiply …

Member Avatar for vegaseat
0
457
Member Avatar for tony75

Hi How to read the second line in text file(MyData,txt) #MyData.txt line1 line2 line3 line4 line5 #read the second line f = open ("MyData.txt","r") for line in f: if line == 2: print line else: print "somthing wrong !" f.close()

Member Avatar for rproffitt
0
224
Member Avatar for Taran_1

I have a bank system that's using a tkinter class to run the program with a graphical user interface looking like this: LARGE_FONT = ("Verdana", 12) class BankSystemGUI(tk.Tk): def __init__(self, *args, **kwargs): tk.Tk.__init__(self, *args, **kwargs) container = tk.Frame(self) container.pack(side="top", fill="both", expand=True) container.grid_rowconfigure(0, weight=1) container.grid_columnconfigure(0, weight=1) self.frames = {} for F …

Member Avatar for Taran_1
0
519
Member Avatar for simm3

Hello everybody, I want to convert python to c but ı did not find any converter. Is it possible to convert

Member Avatar for Reverend Jim
0
344
Member Avatar for HiHe
Member Avatar for martineau
1
21K
Member Avatar for Sheetal_1
Member Avatar for HimaniBansal
Member Avatar for JamesCherrill
0
409
Member Avatar for dukoolsharma
Member Avatar for JamesCherrill
0
349
Member Avatar for pallavi_5

i want to display this number pattern in python, help me! 9 89 789 6789 56789 456789 3456789 23456789 123456789

Member Avatar for vegaseat
0
688
Member Avatar for HimaniBansal
Member Avatar for woooee
0
455
Member Avatar for surtr86

Hi, i have a textfile with a string in it. The string is built like this: test =""" [ "this is a text and its supposed to contain every possible char." ], [ "like *.;#]§< and many more." ], [ "plus there are even newlines in it." ]""" I want …

Member Avatar for woooee
0
491
Member Avatar for Sheetal_1
Member Avatar for chopsthescot

So I'm trying to create a UI that allows multiple buttons in the same window. All of the are toggles to control GPIO outputs to control relays. I've managed to get them to all work individually in their own files, but when put into the same file is all on …

Member Avatar for rproffitt
1
1K
Member Avatar for Xavier_7

I've seen the following code for binding the Escape Key to a Tkinter GUI: import Tkinter as tk def exit(): root.destroy() root = tk.Tk() root.bind("<Escape>", exit) root.mainloop() However, when I add this to my GUI program, I don't get a response when Esc key is pressed. It does nothing. Any …

Member Avatar for vegaseat
0
223
Member Avatar for zoro007

Hello, I want help in scrapy i want scrap this page full source code as Inspect Element mode https://www.contechlighting.com/en/products/recessed-lighting/led when i use this code import scrapy class TEST(scrapy.Spider): name = "quotes" start_urls = [ 'https://www.contechlighting.com/en/products/recessed-lighting/led#t=Products&sort=%40wcs_site_tree_rank ascending&layout=card', ] def parse(self, response): filename = 'contechlighting.html' with open(filename, 'wb') as f: f.write(response.body) get …

Member Avatar for rproffitt
0
266
Member Avatar for edgarfinchley

Can anyone point me in the right direction? I have tried wxlistctrl, ultimatelistctrl and objectlistview, none seem to be able to allow the displayed list to be re-ordered by moving (drag n dropping) an item. Thanks.

Member Avatar for rproffitt
0
166
Member Avatar for maemae14

hello, I am currently working on an assignment in my IPT class and I am trying to get questions from my questions box randomly. I am able to do the random function but I do not want them to repeat. My 'questions box' is a dictionary and I have also …

Member Avatar for woooee
0
297
Member Avatar for Roudha

Vending machine is a machine which dispenses goods/items such as snacks, soft drinks, chocolates, cookies, chips and other selected items to customers automatically, after the customer inserts currency or coins into the machine. The project is required to design, implement to simulate a vending machine. The program will work with …

Member Avatar for rproffitt
-1
916
Member Avatar for Mike_63

Can you please help me with write a python program to read five scores and output the average score and also output the amount by which that score differes from the average. I have done the average part but I don't know how to get the difference of all the …

Member Avatar for Reverend Jim
0
309
Member Avatar for Amanda_11

Hello All, I am working on a python project that helps pull random names from a list in excel and saves them to a new excel file. The input file shows all of the names of the people who can work on that task. I am able to run the …

0
259
Member Avatar for vegaseat

This code shows how to obtain and display a GIF image from an internet website using the Tkinter GUI toolkit that comes with the Python installation.

Member Avatar for woooee
4
25K
Member Avatar for Jordan_15

**hey guys, im trying to get this program done for class. this is the assignment:** For this assignment, you will write a program that uses a method called displayMenu to display a menu like the following: Enter 1 to convert a string to uppercase Enter 2 to convert a string …

Member Avatar for woooee
0
434
Member Avatar for creeperdetonater

I am creating a program in python for a artificial intelligence for chinese checkers, but i cant even get the board to be portrayed! I am using this code: `Code` from tkinter import * root = Tk() board = PhotoImage(file="board.ppm") root.mainloop() I get the error as follows: Traceback (most recent …

Member Avatar for rproffitt
0
608

The End.