I'm stuck on an assignment and would really appreciate some help with the parts that are in bold below:
Write a program that takes a value from a user and stores it in the registry. You can use any key name that you like but also store the current time as another value inside of your new key. Finally, get a directory listing of your current working directory and store that value. You may need to use REG_MULTI_SZ for that value.
THIS IS WHAT I HAVE DONE SO FAR: (It takes the user input and stores the key as what they type but I get an error)
import winreg
# Allow the user to input the title of the key
print('Please enter the name of your key: ')
keyName = input()
# Create the key under software
key = winreg.CreateKey(winreg.HKEY_CURRENT_USER, "Software\\" + keyName)
# Allow the user to input the data
winreg.SetValue(key, winreg.REG_SZ)
response = winreg.QueryValue(key)
print(response)
THE ERROR READS:
winreg.SetValue(key, winreg.REG_SZ)
TypeError: SetValue() takes exactly 4 arguments (2 given)
******************************CODE***********************************
import winreg
import datetime
# Allow the user to input the title of the key
print('Please enter the name of your key: ')
keyName = input()
# Create the key under software
key = winreg.CreateKey(winreg.HKEY_CURRENT_USER, "Software\\" +
keyName)
#saves current time
currenttime= datetime.datetime.time(datetime.datetime.now())
#converts current time to string to that it can be passed to the
key
currenttime=str(currenttime)
# Allow the user to input the data
winreg.SetValue(key,"Log file",winreg.REG_SZ,
"%windir%\system32\calc.exe")
#adding current time to the key
winreg.SetValueEx(key,"Log file",0,winreg.REG_SZ, currenttime)
#Getting current working directory
response = winreg.QueryValue(key,"Log file")
print(response)
**********************Output**************************
![Python 3.7.0 Shell File Edit Shell Debug Options Window Help Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Inte 1)] on win32 Type copyright, credits or license) for more information = RESTART: C:/Users/Suhail/AppData/Local/Programs/Python/Python37-32/key.py= Please enter the name of your key: t testKey %windir%\system32\ calc.exe](http://img.homeworklib.com/questions/839613a0-ca3c-11ea-9cd5-734a7d4f34c6.png?x-oss-process=image/resize,w_560)

I'm stuck on an assignment and would really appreciate some help with the parts that are...
I really would appreciate some help with this assignment and
include comments please as I am in this for learning.
Part I: Maximum increasing subsequence (adapted from Programming Exercise 22.2) Write a program MaxlncreasingSubseq.java that prompts the user to enter a string and displays a maximum length increasing subsequence of characters. Here are four sample runs Enter a string: zebras ers Enter a string: Welcome Welo Enter a string: mmmoooooovwwvee mov Enter a string: abqrstcxyzdefghij abcdefghij You must use dynamic...
Write a shell script that given a radius, calculates the area of a circle. (Hint – don’t write this from scratch. Find another script that reads user input and performs a calculation, then modify it to meet your needs.) Save the script in your home directory with the name circle.sh The formula for calculating the area is: Area=Π*Radius2 You can use 3.14 for Π, and either do Radius*Radius or Radius^2 to get the square of the radius. Use the scale...
Python Help Please! This is a problem that I have been stuck
on.I am only suppose to use the basic python coding principles,
including for loops, if statements, elif statements, lists,
counters, functions, nested statements, .read, .write, while, local
variables or global variables, etc. Thank you! I am using python
3.4.1. ***( The bottom photo is a continuation of the first
one)****
Problem statement For this program, you are to design and implement text search engine, similar to the one...
In this assignment you are going to handle some basic input operations including validation and manipulation, and then some output operations to take some data and format it in a way that's presentable (i.e. readable to human eyes). Functions that you will need to use: getline(istream&, string&) This function allows you to get input for strings, including spaces. It reads characters up to a newline character (for user input, this would be when the "enter" key is pressed). The first...
Please help me with this question. I would really appreciate it. Please explain briefly I am trying to prepare for a test. Consider the following relational database to manage concert and ticket sales. The relations are artist, concert, venue, seat, ticket, and fan. The schemas for these relations (with primary key attributes underlined) are: Artist-schema = (artistname, type, salary) Concert-schema = (artistname, date, venuename, artistfees) Venue-schema = (venuename, address, seating_capacity) Seat-schema=(venuename, row, seatnumber) Ticket-schema = (fanID, date, venuename, row, seatnumber)...
I am really struggling with this assignment, can anyone help? It is supposed to work with two files, one that contains this data: 5 Christine Kim # 30.00 3 1 15 Ray Allrich # 10.25 0 0 16 Adrian Bailey # 12.50 0 0 17 Juan Gonzales # 30.00 1 1 18 J. P. Morgan # 8.95 0 0 22 Cindy Burke # 15.00 1 0 and another that contains this data: 5 40.0 15 42.0 16 40.0 17 41.5...
I need help with this code,
I'm stuck on it, please remember step 4, I'm very much stuck on
that part. It says something about putting how many times it
appears
Assignment #1: Sorting with Binary Search Tree Through this programming assignment, the students will learn to do the following: Know how to process command line arguments. 1 Perform basic file I/O. 2. Use structs, pointers, and strings. Use dynamic memory. 3. 4. This assignment asks you to sort the...
Hey, i'm super stuck on my lab in cs102. I have attempted it but never got close to what the end result should be. Please help, due in 2 days!! Assignment You will be writing a program to simulate a slot machine. The player will start with $1000 and you will repeatedly ask the user how much money they wish to insert into the machine before spinning, or allow the player to quit. If the player runs out of money,...
Hey, need some help in Java. I'm stuck on one step that prevents me from doing the rest of the steps and need help on it. I also have a problem when I print databaseCourse and programmingCourse. instead of saying 5 and 7 respectively is shows 51 and 71. Step 8: in CourseGrades, create a method, add, that takes two parameters, studentNum and grade, and changes the grade of student studetNum to the given grade, grade. studentNum represents the student...
In Python In this programming assignment, you will do multiple programming exercises, and eventually develop a Python application that can calculate student course grades. (6 points) Write a program called p2-1.py to: (1) create a list and add integer numbers from 1 to 100 to the list; (2) calculate the average value of all numbers in the list; and (3) print the result (screenshots). (8 points) Write a program called p2-2.py to: (1) allow a user to define how many...