Answer:
#include <iostream>
using namespace std;
int main() {
int *ip_arr,n;//pointer name inp_arr and integer n to store the size.
cin>>n;//size.
for(int i=0;i<n;i++)
ip_arr[i]=-1;//assigning -1 to every element.
for(int i=0;i<n;i++)
{
cout<<ip_arr[i]<<" ";//printing every element.
}
return 0;
}
output:-
100
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
Explanation:
I am taking input of size.You should enter 100 for 100 values which have value -1.
Answer:
A. dict = {‘Name’: ‘Matthew’, ‘Age’: 14, ‘School’: ‘ABC School’}
Explanation:
Since <em>python does not use type when declaring a variable</em>, you must make sure you make your variables correctly or else it won't compile correctly. Lists use braces[]; Strings use quotes, "" or ''; Integers are just declared with a number(s); Dictionaries use brackets{} and inside are <u>attributes of something</u>. For instance, you can use dictionaries to describe ages, {'"Bryan": 6, "Alex": 13, etc.} <u>Sort of like a json file</u>. Dictionaries also tend to use <u>uppercase letters</u> when describing something. The only answer that has all the attributes correct is A. dict = {‘Name’: ‘Matthew’, ‘Age’: 14, ‘School’: ‘ABC School’}
hope i helped :D
I would love to help. but if you could text my number i could help more. i have a chromebook
One business is " Backwards Beekeepers," Your welcome. >,<