Question
in python 3.0 please
Question 3 (1 point) What is the value of result after the following code snippet? num1 = 20 num2 = 10 num3 = 2 result = num1
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.0

// is the floor division operator.
So, num1 // num2 = 20 // 10 = 2

/ in Python 3.0+ does the floating point division of the operands,

Hence, 2/num3 = 2/2 = 1.0

Add a comment
Know the answer?
Add Answer to:
in python 3.0 please Question 3 (1 point) What is the value of result after the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please answer both questions thank you. Question 49 (1 point) What is wrong with the following...

    Please answer both questions thank you. Question 49 (1 point) What is wrong with the following code snippet? for (int i 1; i <= 5; i++) { int squared = i + i; System.out.println(i + IT "! squared = + squared); } System.out.println("Last square = " + squared); calculation error variable scope error O nothing incorrect use of for loop Question 47 (1 point) What are the values of num1 and num2 and result after the execution of mystery (num1,...

  • Please answer both questions thank you. Assuming that a user enters 8, 15, and 11 as...

    Please answer both questions thank you. Assuming that a user enters 8, 15, and 11 as input values one after another, separated by spaces, what is the output of the following code snippet? int num1 = 0; int num2 = 0; int num3 = 0; Scanner in = new Scanner (System.in); System.out.print("Enter a number: "); numl - in.nextInt(); System.out.print("Enter a number: "); num2 = in.nextInt(); System.out.print("Enter a number: "); num3 = in.nextInt(); if (numl > num2) if (numl > num3)...

  • Write code that sets the value of a variable named result to the sum of the...

    Write code that sets the value of a variable named result to the sum of the values in the variables num1 and num2, unless that sum is in the range 20 to 30, inclusive, in which case set result to 0. Assume num1 and num2 already have values (code in Python).

  • please help to solve the following problem on python 3.0 please Translate the following problem descriptions...

    please help to solve the following problem on python 3.0 please Translate the following problem descriptions into Python. If score is greater than or equal to 90, then grade is set to ‘A’. a) Assume the variables p, v, and r have been assigned some values we want to test. If the expression t / (p – v) is greater than 10, then r is set to 0.   If the result is not greater than 10, r is set to...

  • Question 15 (1 point) What does this program print? Please make sure your spacing is exact....

    Question 15 (1 point) What does this program print? Please make sure your spacing is exact. public class Test { System.out.print("39 + 3"); System.out.println(39 + 3); } 1 A/ Question 5 (1 point) Consider a file called input.txt that has the following 4 lines: Trace the program when it is 89 lines 78.5 is average. Isn't it? What would be the value of count after the following code snippet executes? Scanner in = new Scanner (new File("input.txt")); int count 0;...

  • use python IDEL Please highlight the answer 1 ווCIוסטIT Errors and Exceptions. There are two main...

    use python IDEL Please highlight the answer 1 ווCIוסטIT Errors and Exceptions. There are two main types of errors: syntax errors and runtime errors. Syntax errors are detected by the Python interpreter before the program execution during the parsing stage (parsing is a process, during which the Python interpreter analyzes the grammatical structure of the program). Runtime errors are errors in a program that are not detected by the Python interpreter during its parsing stage. They are further divided into...

  • Question b and c please! 5. (18 points, 3 each) Answer the questions about this data...

    Question b and c please! 5. (18 points, 3 each) Answer the questions about this data segment. Remember that .data starts at Ox10010000. Show the data and address values as 8 hexadecimal numbers (such as Ox00000000). .data num1: .word 7, 4 num2: .word 9 num3: .word 2 letter: .asciiz "A" a. How many bytes of memory are specified,in this data segment? b. What is the value of num3? What value is stored at location Ox10010004? C.

  • use python IDEL Please highlight the answer Problem 1 Errors and Exceptions. There are two main...

    use python IDEL Please highlight the answer Problem 1 Errors and Exceptions. There are two main types of errors: syntax errors and runtime errors. Syntax errors are detected by the Python interpreter before the program execution during the parsing stage (parsing is a process, during which the Python interpreter analyzes the grammatical structure of the program). Runtime errors are errors in a program that are not detected by the Python interpreter during its parsing stage. They are further divided into...

  • java question, my questions are in the following codes with comments, just answer next or under...

    java question, my questions are in the following codes with comments, just answer next or under it thanks! theres only few, so no worry. import java.security.SecureRandom; public class clsTestRand {    public static void main(String[] args) {        // TODO Auto-generated method stub        //int num1, num2, num3, num4, num5, num6;        int num1 = 0;        int num2 = 0;        int num3 = 0;        int num4 = 0;        int...

  • NEED ASAP PLEASE HELP Task: --------------------------------------------------------------------------------------...

    NEED ASAP PLEASE HELP Task: --------------------------------------------------------------------------------------------------------------------------------- Tasks to complete: ---------------------------------------------------------------------------------------------------------------------------------------- given code: ----------------------------------------------------------------------------------------------------------------------------------------------- main.cpp #include <iostream> #include <iomanip> #include "fractionType.h" using namespace std; int main() { fractionType num1(5, 6); fractionType num2; fractionType num3; cout << fixed; cout << showpoint; cout << setprecision(2); cout << "Num1 = " << num1 << endl; cout << "Num2 = " << num2 << endl; cout << "Enter the fraction in the form a / b: "; cin >> num2; cout << endl; cout <<...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT