0

Help Understanding a Python assignment.

I’m confused on the assignment, “Simple Calculator” in Python. Can I please get some help?

8th Dec 2020, 4:09 AM
redprint
redprint - avatar
14 Antworten
+ 7
First you need to create two variables and assign integer input to them. You can make the input expect an integer by changing it to int (input ()) You can use "+" to add variables containing numbers. You can use print () to print the sum. By the way, I gave some hints. Try to finish it yourself. Show your try if you can't solve it.
8th Dec 2020, 4:18 AM
Simba
Simba - avatar
+ 4
Simple Calculator Write a program to take two integers as input and output their sum. Sample Input: 2 8 Sample Output: 10 Remember, input() results in a string. https://www.sololearn.com/coach/615?ref=app
23rd Dec 2020, 4:46 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
+ 2
Thanks you guys! I was able to figure it out thanks to your hints!
8th Dec 2020, 4:20 AM
redprint
redprint - avatar
+ 2
Yes, plzz giv me answer
27th Dec 2020, 3:24 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
15th Apr 2021, 3:56 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
+ 1
Oh, thanks!
8th Dec 2020, 4:17 AM
redprint
redprint - avatar
+ 1
Thanks, man. I appreciate the support especially since I’ve been stumped on this for days.
8th Dec 2020, 4:21 AM
redprint
redprint - avatar
+ 1
Machine Learning - A Forest of Trees Build a Random Forest model. Task You will be given a feature matrix X and target array y. Your task is to split the data into training and test sets, build a Random Forest model with the training set, and make predictions for the test set. Give the random forest 5 trees. You will be given an integer to be used as the random state. Make sure to use it in both the train test split and the Random Forest model. Input Format First line: integer (random state to use) Second line: integer (number of datapoints) Next n lines: Values of the row in the feature matrix, separated by spaces Last line: Target values separated by spaces Output Format Numpy array of 1's and 0's Sample Input 1 10 -1.53 -2.86 -4.42 0.71 -1.55 1.04 -0.6 -2.01 -3.43 1.5 1.45 -1.15 -1.6 -1.52 0.79 0.55 1.37 -0.23 1.23 1.72 0 1 1 0 1 0 0 1 0 1 Sample Output [1 0 0] Explanation The train test split puts these three points into the test set: [-1.55 1.04], [1.23 1.72], [-1.6 -1.52]. The true values for t
27th Dec 2020, 3:14 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
+ 1
Thanks for the hint
29th Dec 2020, 4:33 PM
Yinka Bello
Yinka Bello - avatar
0
Beginner Simple calculator means only addition, substraction, multiplication, division. So here is some hint:- Suppose you have 2 numbers a and b a + b (Add) a - b (Sub) a * b (Mult) a / b (Div) Do this using programming.
8th Dec 2020, 4:16 AM
A͢J
A͢J - avatar
0
EagerBeaver Good Luck in programming world.
8th Dec 2020, 4:21 AM
A͢J
A͢J - avatar
0
already answered
23rd Dec 2020, 4:56 AM
redprint
redprint - avatar
0
this is for python not machine learning smh
27th Dec 2020, 3:19 AM
redprint
redprint - avatar
31st Dec 2020, 4:14 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar