Python and Pandas for Data Engineering Week1
.docx
keyboard_arrow_up
School
Grand Rapids Community College *
*We aren’t endorsed by this school
Course
247
Subject
Computer Science
Date
Dec 6, 2023
Type
docx
Pages
4
Uploaded by ConstableWildcatMaster401
Congratulations! You passed!
Grade received 87.50%
Latest Submission Grade 87.50%
To pass 80% or higher
Go to next item
1.
Question 1
What is the result of the expression
1
1
**
2
1 / 1 point
Nothing
1
An error.
2
Correct
Yes, that is correct!
2.
Question 2
Which type of statement is used to output text?
1 / 1 point
Assignment statements.
Print statements.
Import statements
Correct
Yes, that is correct!
3.
Question 3
Which type of statement is used to bring another modules functionality into your workspace?
1 / 1 point
Import statements
assert statements
print statements
expression statements
Correct
Yes, that's right!
4.
Question 4
What is the value of the variable
a
after this code is run:
1
2
a, b =
1
,
2
b, a = a, b
1 / 1 point
2
3
1
"b"
Correct
Yes, that is right!
5.
Question 5
Which is the correct output for the code
1
2
3
4
5
i =
0
while
i <
5
:
print
(i)
i = i +
1
1 / 1 point
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
0
1
2
3
4
1
2
3
4
5
6
0
1
2
3
4
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
including the extra credit and Comments - Explain your codethroughout
arrow_forward
A- Choose the right answer
(5 only)
1- The result value of "Boolean data type" is
(a) Number
(b) True or False
(c) latter
(d) None
2- The 'Caption' property is used to change
(a)
Color
(b) Name
(c) Font
(d) Size
3- If you need to have a form disappears but remains available in memory you should
use
the
method.
(a) ShowDialog
(b) Show
(c) Hide
(d) Close
4- In MsgBox, 16 value is used to display
(а) Vbcritical
structure.
(b) vbquestion
(с) Both
(d) None
5- The Timer tool returns the time in
(a) Second
(b) millisecond
(c) Minute
(d) None
6- The code below "list1.AddItem (Text1.Text)" is used to copy the content of
to
(a) List to Text
(b) Text to list
(c) Both
(d) None
1
arrow_forward
Direction: Answer the following, write your answer in a word document and convert it to pdf file.
1. Create a program that prompt user to input two numbers and displays the six types of relationships for the two inputted numbers.
2. Create a program that applies the concept of login form using logical operators.
Username = 25
Password = 12
Sample output:
Enter username: 25
Enter password: 12
"You are successfully login"
while if wrong input the message is "you are not allowed to login"
3. Create a program that prompt user to input a value for variable a then displays the value of the following assignment operators such as +=, --, *=, /=, %=. int a, b, c
Sample output
Enter a value for a = 3;
Enter a value for b= 3;
The value of c = a is:
The value of c =+a is:
The value of c =-a is:
The value of c ="a is:
The value of c =/a is:
The value of c =%a is:
arrow_forward
A- Choose the right answer
1- The result value of "Boolean data type" is
(a) Number
(b) True or False
(c) latter
(d) None
2- The 'Caption' property is used to change
(а)
Color
(b) Name
(c) Font
(d) Size
3- If you need to have a form disappears but remains available in memory you should
use
the
method.
(a) ShowDialog
(b) Show
(c) Hide
(d) Close
4- In MsgBox, 16 value is used to display
(b) vbquestion
structure.
(a) Vbcritical
(с) Both
(d) None
5- The Timer tool returns the time in
(a) Second
(b) millisecond
(c) Minute
(d) None
6- The code below "listl.AddItem (Text1.Text)" is used to copy the content of
to
(a) List to Text
(b) Text to list
(c) Both
(d) None
1
arrow_forward
i need the answer quickly
arrow_forward
7
Select the value that is returned by the following expression.
"abcd"[2:]
Try to answer this question from your understanding and not typing the expression into the Python shell. It will help reinforce your understanding of basic Python expressions.
Question 7 options:
"ab"
"bc"
"cd"
error
arrow_forward
choose the correct answer
Q1/ Option Button: used to select two option from a group of options *
1-True
2-false
Q 2/ V. Basic is a low -level programming language. *
1-true
2-False
Q3/ Displaying Messages in Message Boxes. General Form: *
1-MessageBox .Show(TextMessage)
2-MessageBox.Show (TextMessage, TitlebarText)
3-MessageBox.Show(TextMessage , TitlebarText, MessageBoxButtons)
4-MessageBox.Show(TextMessage, TitlebarText, MessageBoxButtons, MessageBoxicon)
5-All above
arrow_forward
Add comments!
arrow_forward
1. Create a program that will determine if an input character is a number, a letter, or a special symbol
2. Create a program that will determine if a number is divisible by 3 or 4
3. Create a program that will determine if a number is divisible by 3 and 4
4. Create a program that will ask for the username and password.USER NAME:PASSWORD:Note:a. Correct username and password combination, display “You entered a valid username and password combination” and “Access Granted”.b. Incorrect username and/or password combination, display “Please check your input”, “Username and/or the password is invalid”, and “Access Denied”.
5. Create a program that will ask three (3) numbers from the user then display the highestnumber among these numbers
6. Create a program that will do the following:Press 1 to ADDPress 2 to SubtractPress 3 to MultiplyPress 4 to DivideEnter Option Here: ___Enter First Number: ___Enter Second Number: ___Output: ___Note:A. Dividing with zero is not possible.B. Pressing other…
arrow_forward
Machine Problem 3
Write a program that accepts integer as input and display the equivalent roman
numeral and vice-versa. The program should be written in OOP.
SAMPLE GUIDE
1 2 3 4 5 6 7
8 9
IV v VI VII
XXX XL L LX LXX
CC CcC CD
Ones
II
VIII
IX
Tens
XX
LXXX
XC
Hundreds
D DC DCC DCCC
CM
Thousands
M
MM
arrow_forward
DO NOT COPY FROM OTHER WEBSITES
Code with comments and output screenshot is must for an Upvote. Thank you!
arrow_forward
Can someone help me understand the errors in my code please? If you could explain it one by one I'd highly appreciate it. This is written in Python.
arrow_forward
Q2 / Design and implement a
program in Visual Basic language
to implement the following: 1- Print
multiples of the number 4 less
than 100 2-Test the username and
password in case the entered data is
correct, change the textbox color to
yellow.
%3D
arrow_forward
#1. Airplane Seating Assignment. Write a C# Windows App that can be used to assign seats for a
commercial airplane. The airplane has 13 rows, with 6 seats in each row. Rows 1 and 2 are first class,
rows 3 to 7 are business class, and rows 8 to 13 are economy class. Your program prompts the user to
enter the following input: Design the form to accept the user input.
a. Personal Information (Complete Name, Address, Contact #, Passport #)
b. Ticket type (first class, business class or economy class - look for the fares for each ticket type)
c. Click Desired seat from the seating plan.
Note: Design your form displaying the seating plan in the following format. Put also appropriate
titles/headings.
ABCDE F
Row 1
.• x* X X
Row 2
* X* X .X
Row 3
* X X X
Row 4
X * X X
Row 5
*x X*
Row 6
*x *
* X
Row 7
X X
Row 8
* XX X.
Row 9
X X X X
Row 10
• X X XX
.• x• x •
Row 12 ** x x* x
Row 13 ** *x*
Row 11
Here * indicates that the seat is available; X indicates that the seat has been assigned.
d. For…
arrow_forward
Debugging:
There are errors in the following code snippet. Locate and fix all the errors with your own comments
to get full credit for the question. Assume the goal of the program is to perform a simulation to
estimate the probability of rolling three of a kind in a single roll of three six-sided dice.
File Edit Format Run Options Window Help
# Estimate the probability of rolling three of a kind
# in a singel roll of three six-sided dice.
def main ():
n input ("How many rolls would you like to simulate?")
hits = 0
for i in range (n):
if equalRolls (3):
hits += 1
print ("Estimated prob = ", float (hits) /n)
def equalRolls (count):
first = randrange (1,7)
for i in range (count) :
roll
if roll != first:
return False
return True
name
------
randrange (1,7)
1
if
main ()
Note: your output will not be exactly the same due to (pseudo)randomness
Test Case1:
How many rolls would you like to simulate? 100
Estimated prob = 0.01
_main____¹:
Test Case2:
How many rolls would you like to simulate?…
arrow_forward
Blockly allows the creation of a program with entering the code.
Select one:
True
False
arrow_forward
Instructions
The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly.
An example of the program is shown below:
Enter an integer >> 13 Enter a second integer >> 24 Enter a third integer >> 101 The sum of 13 and 24 is 37 The sum of 24 and 101 is 125 The sum of 13 and 101 is 114 The difference between 13 and 24 is -11 The difference between 24 and 101 is -77 The difference between 13 and 101 is -88
Task 1: The DebugThree3 class compiles without error.
Task 2: The add() method adds two integers.
Task 3: The subtract() method subtracts two integers.
Task 4: The DebugThree2 program accepts user input and displays the correct output.
arrow_forward
Instructions
The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly.
An example of the program is shown below:
Enter an integer >> 13 Enter a second integer >> 24 Enter a third integer >> 101 The sum of 13 and 24 is 37 The sum of 24 and 101 is 125 The sum of 13 and 101 is 114 The difference between 13 and 24 is -11 The difference between 24 and 101 is -77 The difference between 13 and 101 is -88
Task 1: The DebugThree3 class compiles without error.
Task 2: The add() method adds two integers.
Task 3: The subtract() method subtracts two integers.
Task 4: The DebugThree2 program accepts user input and displays the correct output.
arrow_forward
Could someone please help me with this? I hate to ask and this is my first time, however, I spent all weekend with other homework for the class and I am just too behind to get this done without making it really late. I would greatly appreciate it. Please don't get the code from somewhere else. Thank you, kindly.
arrow_forward
TRUE-FALSE: Type YES if the given statement is correct. Otherwise, type NO.
Analyzing information nowadays is easier than in the past.
arrow_forward
True or false:
In order to comment out a line of code, use # in front of the line.
(python)
arrow_forward
PYTHON PROGRAMMING!!
EXTRA CONSTRAINT: MAKE SURE THAT THE CODE ACCEPTS THE INPUT ON THE IMAGE AND OUTPUTS THE RESULT ON THE IMAGE AS WELLYou find yourself in a top-secret mission to infiltrate and disable the nuclear missile silos of a terrorist organization threatening to destroy any country that refuses to surrender. Fortunately, an ally double agent was able to successfully hijack the launch system used by the terrorists. However, in order to not get found out, they could not disable the system outright but they were able to infect the system with an undetectable virus that stops all processes of the system was activated.
Through a secure line, the double agent gives you the instructions in order to activate the virus and stop all missiles from firing:
In the trash can nearest the main computer, you should be able to get a crumpled piece of paper with a grid of random numbers printed onto it. You will know that it is the right piece of paper if there are the same number of rows and…
arrow_forward
A. What would be the answer to the following expression?
7 > 7 AND 8 < 4 ^ 2
Select one:
a.7
b.None of the above
c.FALSE
d.TRUE
B. In a selection structure, you perform an action or task, and then you perform the next action in order.
Select one:
True
False
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Related Questions
- including the extra credit and Comments - Explain your codethroughoutarrow_forwardA- Choose the right answer (5 only) 1- The result value of "Boolean data type" is (a) Number (b) True or False (c) latter (d) None 2- The 'Caption' property is used to change (a) Color (b) Name (c) Font (d) Size 3- If you need to have a form disappears but remains available in memory you should use the method. (a) ShowDialog (b) Show (c) Hide (d) Close 4- In MsgBox, 16 value is used to display (а) Vbcritical structure. (b) vbquestion (с) Both (d) None 5- The Timer tool returns the time in (a) Second (b) millisecond (c) Minute (d) None 6- The code below "list1.AddItem (Text1.Text)" is used to copy the content of to (a) List to Text (b) Text to list (c) Both (d) None 1arrow_forwardDirection: Answer the following, write your answer in a word document and convert it to pdf file. 1. Create a program that prompt user to input two numbers and displays the six types of relationships for the two inputted numbers. 2. Create a program that applies the concept of login form using logical operators. Username = 25 Password = 12 Sample output: Enter username: 25 Enter password: 12 "You are successfully login" while if wrong input the message is "you are not allowed to login" 3. Create a program that prompt user to input a value for variable a then displays the value of the following assignment operators such as +=, --, *=, /=, %=. int a, b, c Sample output Enter a value for a = 3; Enter a value for b= 3; The value of c = a is: The value of c =+a is: The value of c =-a is: The value of c ="a is: The value of c =/a is: The value of c =%a is:arrow_forward
- A- Choose the right answer 1- The result value of "Boolean data type" is (a) Number (b) True or False (c) latter (d) None 2- The 'Caption' property is used to change (а) Color (b) Name (c) Font (d) Size 3- If you need to have a form disappears but remains available in memory you should use the method. (a) ShowDialog (b) Show (c) Hide (d) Close 4- In MsgBox, 16 value is used to display (b) vbquestion structure. (a) Vbcritical (с) Both (d) None 5- The Timer tool returns the time in (a) Second (b) millisecond (c) Minute (d) None 6- The code below "listl.AddItem (Text1.Text)" is used to copy the content of to (a) List to Text (b) Text to list (c) Both (d) None 1arrow_forwardi need the answer quicklyarrow_forward7 Select the value that is returned by the following expression. "abcd"[2:] Try to answer this question from your understanding and not typing the expression into the Python shell. It will help reinforce your understanding of basic Python expressions. Question 7 options: "ab" "bc" "cd" errorarrow_forward
- choose the correct answer Q1/ Option Button: used to select two option from a group of options * 1-True 2-false Q 2/ V. Basic is a low -level programming language. * 1-true 2-False Q3/ Displaying Messages in Message Boxes. General Form: * 1-MessageBox .Show(TextMessage) 2-MessageBox.Show (TextMessage, TitlebarText) 3-MessageBox.Show(TextMessage , TitlebarText, MessageBoxButtons) 4-MessageBox.Show(TextMessage, TitlebarText, MessageBoxButtons, MessageBoxicon) 5-All abovearrow_forwardAdd comments!arrow_forward1. Create a program that will determine if an input character is a number, a letter, or a special symbol 2. Create a program that will determine if a number is divisible by 3 or 4 3. Create a program that will determine if a number is divisible by 3 and 4 4. Create a program that will ask for the username and password.USER NAME:PASSWORD:Note:a. Correct username and password combination, display “You entered a valid username and password combination” and “Access Granted”.b. Incorrect username and/or password combination, display “Please check your input”, “Username and/or the password is invalid”, and “Access Denied”. 5. Create a program that will ask three (3) numbers from the user then display the highestnumber among these numbers 6. Create a program that will do the following:Press 1 to ADDPress 2 to SubtractPress 3 to MultiplyPress 4 to DivideEnter Option Here: ___Enter First Number: ___Enter Second Number: ___Output: ___Note:A. Dividing with zero is not possible.B. Pressing other…arrow_forward
- Machine Problem 3 Write a program that accepts integer as input and display the equivalent roman numeral and vice-versa. The program should be written in OOP. SAMPLE GUIDE 1 2 3 4 5 6 7 8 9 IV v VI VII XXX XL L LX LXX CC CcC CD Ones II VIII IX Tens XX LXXX XC Hundreds D DC DCC DCCC CM Thousands M MMarrow_forwardDO NOT COPY FROM OTHER WEBSITES Code with comments and output screenshot is must for an Upvote. Thank you!arrow_forwardCan someone help me understand the errors in my code please? If you could explain it one by one I'd highly appreciate it. This is written in Python.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education