Python Programming: An Introduction to Computer Science, 3rd Ed.
Python Programming: An Introduction to Computer Science, 3rd Ed.
3rd Edition
ISBN: 9781590282755
Author: John Zelle
Publisher: Franklin, Beedle & Associates
bartleby

Videos

Question
Book Icon
Chapter 12, Problem 3PE
Program Plan Intro

Tracking conference attendees

Program plan:

  • Import the package.
  • Create a class “Conference_Manager”,
    • Define the “_init_()” function,
      • Create empty list.
      • Open the input file in read mode.
      • Read all the characters from the file using “read()”.
      • Parse the json string using “json_loads()”.
      • Create a “for” loop to iterate all the keys which are obtained from “json_object”.
        • Assign initial values by invoking “_init_()”.
        • Append the value at the end of the list.
      • Close the input file.
    • Define the getter method “get_JSON()”,
      • Return the key, value pairs get from “json_object”.
    • Define the getter method “get_Attendee()”,
      • Create “for” loop to iterate over elements of list.
        • Check whether the value return from “get_Name()” is equal to the value stored in “name,
          • Return the list.
    • Define the getter method “find_ByState()”,
      • Create a list.
      • Create “for” loop to iterate over elements of list.
        • Check whether the value return from “get_State()” is equal to the value stored in “state”,
          • If it is true, append the value to the end of the list.
      • Return the list.
    • Define the getter method “make_Attendee()”,
      • Assign the value to the list return from “_init_ ()” method from Attendee class.
      • Append the value to the end of the list.
    • Define the method “del_Attendee()”,
      • Create for loop,
        • Check whether the name is return from “get_name()”,
          • If it is true, remove the element using “pop()”.
    • Define the method “update_Conference()”,
      • Create a list.
      • Create for loop,
        • Check whether the name is return from “get_name()”,
          • Append the value to the end of the list.
            • Open the output file in write mode,
              • Serialize the object as a JSON formatted stream using “json_dump()”.
  • Create a class “Attendee”,
    • Define the function “_init_()”,
      • Assign the initial values for the variables.
    • Define the getter method “get_Name()” to return the value stored in “name”.
    • Define the getter method “get_Company()” to return the value stored in “company”.
    • Define the getter method “get_State()” to return the value stored in “state”.
    • Define the getter method “get_Email()” to return the value stored in “email”.
    • Define the method “display_Info()” to print the formatted output.
  • Define the “main()” function,
    • Call the constructor to initialize the values.
    • Call “make_Attendee()” function.
    • Assign the value return from “get_Attendee()”.
    • Assign the value return from “find_ByState()”.
    • Print the value return from “get_Company()”.
    • Print the value return from “get_Name()”.
    • Print the value return from “get_Sate()”.
    • Print the value return from “get_Email()”.
    • Call the function “display_Info()”.
    • Create for loop,
      • Print the value return from “get_Name()”.
  • Call the “main()” function.

Blurred answer
Students have asked these similar questions
Write a program that reads student data from a file, compute their GPA and writes the results to a different file. 1. The user should have the option to either enter their text file that contains the student grades or use the provided text file that contains theinformation. The data in "indata.txt" should look similar to this, Lara_Croft75 70 91 69 89Chris_Redfield68 88 79 85 94Johnny_Cochran69 98 95 77 80Wanda_Maximoff84 86 98 95 92Luke_Skywalker74 96 80 98 97William_Kurt89 52 99 81 58Samuel_Jackson50 96 50 64 95END_OF_FILE   This is supposed to be in python. This is what I have so far. I have no experience I apologise. I am trying to finish the GPA calculating program currently but am having trouble finishing it. grade = input("enter grades")points = 0 if grade is 90-99:total_points = 4.0if grade is 80-89:total_points = 3.0if grade is 70-79:total_points = 2.0if grade is 60-69:total_points = 1.0if grade is 50-59:total_points = 0.0gpa = total_points/len(grade)print(gpa,"is gpa")
You are a cyber investigator, your task is to write a python program that can read file signatures from a file and save them into a list. Each file signature is an element of your list. Then, try to find out if there is a JPG file in there. If there is a JPG file, print out a True on screen. (File Signature for JPG file is: FF D8 FF DB) The input file is: FSCS360_Midterm_Exam_Part2.txt
Write a program that will sequentially list numbers from 0 to 50, changing its color depending on the size of the number, for example, for numbers from 0 to 10 it will be green, 11 to 22 red and 23 to 35 blue, etc. Limit the screen output speed to about 1 character / second. In order to change colors, you must first use the GetStdHandle function to get a handle to the console, which is similar to getting a file pointer before working with a file. It is done e.g. as follows: HANDLE hConsole;     hConsole = GetStdHandle (STD_OUTPUT_HANDLE); The above functions are defined in windows.h Tip 2: Write a utility to find out the colors corresponding to all combinations from 0 to 255. Tip 3: Instructions and sample program for working with time.   C language plz with explanation of codes. thanks
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Files & File Systems: Crash Course Computer Science #20; Author: CrashCourse;https://www.youtube.com/watch?v=KN8YgJnShPM;License: Standard YouTube License, CC-BY
UNIX Programming (Part - 10) The File System (Directories and Files Names); Author: ITUTEES;https://www.youtube.com/watch?v=K35faWBhzrw;License: Standard Youtube License