Python Forum

Full Version: Input values and write csv
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!
New to Python and would like advice if Im on the right track.

What I would like to achive is.
Write a program to let the user input two values, First value is "Price for weekdays hours 06-21" and the other value "Price for all other days and hours".
Depending on the month the user run the program it should pick up current month and days and then write the information to a csv file.
The expected output below where the price 2,77 is entered for weekdays hours 06-21.
04.03.2021;0;0;0;;0;0;0;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;0;0;0
05.03.2021;0;0;0;;0;0;0;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;2,77;0;0;0
06.03.2021;0;0;0;;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
07.03.2021;0;0;0;;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0

I started to use tkinter to let user add values, is this the best way? Any suggestions are more than welcome! :)
Tkinter is a GUI, or graphical user interface. Easier would be to use a console interface and just ask the questions. Recommend not tackling Tkinter until you need to