Homework Solution: Lab 1.4-Python Code (Optional) Critical Review Comments in Python are preceded by thesign. Input of st…

    Lab 1.4-Python Code (Optional) Critical Review Comments in Python are preceded by thesign. Input of strings into a variable is done using the input fiumction. This fumction converts the input to a series of characters so they can be used later in the program. This is often written as an equation such as malarial mmuteEnter a string value·). Using intO function for converting a string into integer or float.) function for converting a string into real. Equations are written similarly to the method used in pseudocode, but without the Set keyword. For example totalapples+oranges. Complex formulas should use parentheses to group processes. In addition, if input values are taken in as integers, but will be used to calculate a decimal value, they must be converted to real values. For example average = (test1+ test2) /2. To display information to the screen, the print command is used with the string, which is written within single quotation marks. If the value of a variable needs to displayed after the string, a comma separates the two. For example, print The average average. This lab requires you to translate your work in the pseudocode and flowchart to actual code using Python Read the following program prior to completing the lab. Write 교 program that will t교ke in basic information from a tudent, including student name , degree name , number of credits taten so far and the total nunber of credits required in the degree program. The program rill then calculate how many credits are needed to graduate. Display should include the student nane, the degree namer and credits left to graduate Step 1: Examine the following line of code. What do you expect as output to the creen? 35185RSITARI = input lEnter student name: } Step 2: Examine the following line of code. What type of value do you expect the user of the program to
    Lab 1.4-Python Code (Optional) Critical Review Comments in Python are preceded by thesign. Input of strings into a variable is done using the input fiumction. This fumction converts the input to a series of characters so they can be used later in the program. This is often written as an equation such as malarial mmute"Enter a string value·'). Using intO function for converting a string into integer or float.) function for converting a string into real. Equations are written similarly to the method used in pseudocode, but without the Set keyword. For example totalapples+oranges. Complex formulas should use parentheses to group processes. In addition, if input values are taken in as integers, but will be used to calculate a decimal value, they must be converted to real values. For example average = (test1+ test2) /2. To display information to the screen, the print command is used with the string, which is written within single quotation marks. If the value of a variable needs to displayed after the string, a comma separates the two. For example, print The average average. This lab requires you to translate your work in the pseudocode and flowchart to actual code using Python Read the following program prior to completing the lab. Write 교 program that will t교ke in basic information from a tudent, including student name , degree name , number of credits taten so far and the total nunber of credits required in the degree program. The program rill then calculate how many credits are needed to graduate. Display should include the student nane, the degree namer and credits left to graduate Step 1: Examine the following line of code. What do you expect as output to the creen? 35185RSITARI = input l'Enter student name: ' } Step 2: Examine the following line of code. What type of value do you expect the user of the program to

    Expert Answer

     
    This code should produce output similar to the one given in page 13. If you need anything more, please let me know.

    Lab 1.4-Python Enactment (Optional) Critical Review Comments in Python are preceded by thesign. Input of strings into a mutable is executed using the input fiumction. This fumction converts the input to a course of characters so they can be verificationd succeeding in the program. This is repeatedly written as an equation such as malarial mmuteEnter a string treasure·). Using intO duty control converting a string into integer or bear.) duty control converting a string into authentic. Equations are written alikely to the process verificationd in pseudocode, save outside the Set keyword. Control pattern entiretyapples+oranges. Complex controlmulas should verification parentheses to clump processes. In attention, if input treasures are captured in as integers, save gain be verificationd to investigate a decimal treasure, they must be converted to authentic treasures. Control pattern mediocre = (test1+ test2) /2. To exhibit notification to the curtain, the stereoform bid is verificationd with the string, which is written amid solitary citation marks. If the treasure of a mutable scarcitys to exhibited behind the string, a comma separates the brace. Control pattern, stereoform The mediocre mediocre. This lab requires you to interpret your effort in the pseudoenactment and flowchart to express enactment using Python Read the coercionthcoming program precedent to completing the lab. Write 교 program that gain t교ke in basic notification from a tudent, including learner spectry , rank spectry , sum of credits taten so distant and the entirety nunber of credits required in the rank program. The program brook then investigate how sundry credits are scarcityed to furrow. Exhibit should comprise the learner nane, the rank spectryr and credits left to furrow Step 1: Examine the coercionthcoming outoutcourse of enactment. What do you coercionesee as output to the creen? 35185RSITARI = input lEnter learner spectry: } Step 2: Examine the coercionthcoming outoutcourse of enactment. What coercionm of treasure do you coercionesee the verificationr of the program to

    Lab 1.4-Python Enactment (Optional) Critical Review Comments in Python are preceded by thesign. Input of strings into a mutable is executed using the input fiumction. This fumction converts the input to a course of characters so they can be verificationd succeeding in the program. This is repeatedly written as an equation such as malarial mmute”Enter a string treasure·’). Using intO duty control converting a string into integer or bear.) duty control converting a string into authentic. Equations are written alikely to the process verificationd in pseudocode, save outside the Set keyword. Control pattern entiretyapples+oranges. Complex controlmulas should verification parentheses to clump processes. In attention, if input treasures are captured in as integers, save gain be verificationd to investigate a decimal treasure, they must be converted to authentic treasures. Control pattern mediocre = (test1+ test2) /2. To exhibit notification to the curtain, the stereoform bid is verificationd with the string, which is written amid solitary citation marks. If the treasure of a mutable scarcitys to exhibited behind the string, a comma separates the brace. Control pattern, stereoform The mediocre mediocre. This lab requires you to interpret your effort in the pseudoenactment and flowchart to express enactment using Python Read the coercionthcoming program precedent to completing the lab. Write 교 program that gain t교ke in basic notification from a tudent, including learner spectry , rank spectry , sum of credits taten so distant and the entirety nunber of credits required in the rank program. The program brook then investigate how sundry credits are scarcityed to furrow. Exhibit should comprise the learner nane, the rank spectryr and credits left to furrow Step 1: Examine the coercionthcoming outoutcourse of enactment. What do you coercionesee as output to the creen? 35185RSITARI = input l’Enter learner spectry: ‘ } Step 2: Examine the coercionthcoming outoutcourse of enactment. What coercionm of treasure do you coercionesee the verificationr of the program to

    Expert Acceptance

     

    This enactment should effect output alike to the individual attached in page 13. If you scarcity anything further, delight suffer me perceive.

    spectry = raw_input(“Enter Learner spectry. “);
    degree_spectry = raw_input(“Enter Rank spectry. “);
    credits_required = input(“Enter the sum of credits required control the rank. “);
    credits = input(“Enter sum of credits captured so distant. “);

    left = credits_required – credits;
    print(“Student’s spectry is ” + spectry);
    print(“Rank spectry is ” + rank_name);
    print(“There are ” + str(left) + ” credits left control graduation”);